azure-core
Public Types | Static Public Member Functions | List of all members
Azure::Core::Diagnostics::Logger Class Referencefinal

Log message handler.

#include <logger.hpp>

Public Types

enum  Level : int { Level::Verbose = 1, Level::Informational = 2, Level::Warning = 3, Level::Error = 4 }
 Log message level. More...
 

Static Public Member Functions

static void SetListener (std::function< void(Level level, std::string const &message)> listener)
 Sets the function that will be invoked to report an Azure SDK log message. More...
 
static void SetLevel (Level level)
 Sets the log message level an application is interested in receiving. More...
 

Member Enumeration Documentation

◆ Level

Enumerator
Verbose 

Logging level for detailed troubleshooting scenarios.

Informational 

Logging level when a function operates normally.

Warning 

Logging level when a function fails to perform its intended task.

Error 

Logging level for failures that the application is unlikely to recover from.

Member Function Documentation

◆ SetLevel()

void Logger::SetLevel ( Logger::Level  level)
static
Parameters
levelThe most verbose level to receive log messages for. Least verbose levels will be included, more verbose levels will be not.

◆ SetListener()

void Logger::SetListener ( std::function< void(Level level, std::string const &message)>  listener)
static
Parameters
listenerA callback function that will be invoked when the SDK reports a log message. If nullptr, no function will be invoked.

The documentation for this class was generated from the following files: