Aspose::Email::Tools::Logging::LoggerManager Class Reference

Static manager that controls the creation of loggers. More...

Inherits Object.

Public Member Functions

 LoggerManager ()=delete
 

Static Public Member Functions

static System::SharedPtr< LoggerGetLogger (System::String name)
 Gets a logger by the specified name. More...
 
static void AddLogger (System::String name, System::SharedPtr< Logger > logger)
 Adds a logger to the LoggerManager with specified name. More...
 
static void RemoveLogger (System::String name)
 Removes a logger with the specified name. More...
 
static bool ContainsLogger (System::String name)
 Determines whether the logger cache contains an object with the specified logger name. More...
 
static System::SharedPtr< LoggerCreateLogger (System::String name, System::SharedPtr< Appender > appender)
 Creates a logger with specified name and appender. More...
 
static System::SharedPtr< LoggerCreateLogger (System::String name, const System::ArrayPtr< System::SharedPtr< Appender >> &appenders)
 Creates a logger with specified name and appender. More...
 
static System::SharedPtr< LoggerCreateLogger (System::String name, System::SharedPtr< LogLevel > severity, System::SharedPtr< Appender > appender)
 Creates a logger with specified name and appender. More...
 
static System::SharedPtr< LoggerCreateLogger (System::String name, System::SharedPtr< LogLevel > severity, const System::ArrayPtr< System::SharedPtr< Appender >> &appenders)
 Creates a logger with specified name and appender. More...
 

Detailed Description

Static manager that controls the creation of loggers.

Constructor & Destructor Documentation

◆ LoggerManager()

Aspose::Email::Tools::Logging::LoggerManager::LoggerManager ( )
delete

Member Function Documentation

◆ AddLogger()

static void Aspose::Email::Tools::Logging::LoggerManager::AddLogger ( System::String  name,
System::SharedPtr< Logger logger 
)
static

Adds a logger to the LoggerManager with specified name.

Parameters
nameThe logger name.
loggerThe logger.

◆ ContainsLogger()

static bool Aspose::Email::Tools::Logging::LoggerManager::ContainsLogger ( System::String  name)
static

Determines whether the logger cache contains an object with the specified logger name.

Parameters
nameThe logger name.
Returns
true if the logger cache contains an element with the key; otherwise, false.

◆ CreateLogger() [1/4]

static System::SharedPtr<Logger> Aspose::Email::Tools::Logging::LoggerManager::CreateLogger ( System::String  name,
const System::ArrayPtr< System::SharedPtr< Appender >> &  appenders 
)
static

Creates a logger with specified name and appender.

Parameters
nameThe logger name.
appendersThe appender.
Returns
The created logger.

◆ CreateLogger() [2/4]

static System::SharedPtr<Logger> Aspose::Email::Tools::Logging::LoggerManager::CreateLogger ( System::String  name,
System::SharedPtr< Appender appender 
)
static

Creates a logger with specified name and appender.

Parameters
nameThe logger name.
appenderThe appender.
Returns
The created logger.

◆ CreateLogger() [3/4]

static System::SharedPtr<Logger> Aspose::Email::Tools::Logging::LoggerManager::CreateLogger ( System::String  name,
System::SharedPtr< LogLevel severity,
const System::ArrayPtr< System::SharedPtr< Appender >> &  appenders 
)
static

Creates a logger with specified name and appender.

Parameters
nameThe logger name.
severityThe severity.
appendersThe appenders array.
Returns
The created logger.

◆ CreateLogger() [4/4]

static System::SharedPtr<Logger> Aspose::Email::Tools::Logging::LoggerManager::CreateLogger ( System::String  name,
System::SharedPtr< LogLevel severity,
System::SharedPtr< Appender appender 
)
static

Creates a logger with specified name and appender.

Parameters
nameThe logger name.
severityThe severity.
appenderThe appender.
Returns
The created logger.

◆ GetLogger()

static System::SharedPtr<Logger> Aspose::Email::Tools::Logging::LoggerManager::GetLogger ( System::String  name)
static

Gets a logger by the specified name.

Parameters
nameThe logger name.
Returns
The logger.

◆ RemoveLogger()

static void Aspose::Email::Tools::Logging::LoggerManager::RemoveLogger ( System::String  name)
static

Removes a logger with the specified name.

Parameters
nameThe logger name.