LoggerManager

Inheritance: java.lang.Object

public class LoggerManager

Static manager that controls the creation of loggers.

Constructors

Constructor Description
LoggerManager()

Methods

Method Description
getLogger(String name) Gets a logger by the specified name.
addLogger(String name, Logger logger) Adds a logger to the LoggerManager with specified name.
removeLogger(String name) Removes a logger with the specified name.
containsLogger(String name) Determines whether the logger cache contains an object with the specified logger name.
createLogger(String name, Appender appender) Creates a logger with specified name and appender.
createLogger(String name, Appender[] appenders) Creates a logger with specified name and appender.
createLogger(String name, LogLevel severity, Appender appender) Creates a logger with specified name and appender.
createLogger(String name, LogLevel severity, Appender[] appenders) Creates a logger with specified name and appender.

LoggerManager()

public LoggerManager()

getLogger(String name)

public static Logger getLogger(String name)

Gets a logger by the specified name.

Parameters:

Parameter Type Description
name java.lang.String The logger name.

Returns: Logger - The logger.

addLogger(String name, Logger logger)

public static void addLogger(String name, Logger logger)

Adds a logger to the LoggerManager with specified name.

Parameters:

Parameter Type Description
name java.lang.String The logger name.
logger Logger The logger.

removeLogger(String name)

public static void removeLogger(String name)

Removes a logger with the specified name.

Parameters:

Parameter Type Description
name java.lang.String The logger name.

containsLogger(String name)

public static boolean containsLogger(String name)

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

Parameters:

Parameter Type Description
name java.lang.String The logger name.

Returns: boolean - true if the logger cache contains an element with the key; otherwise, false.

createLogger(String name, Appender appender)

public static Logger createLogger(String name, Appender appender)

Creates a logger with specified name and appender.

Parameters:

Parameter Type Description
name java.lang.String The logger name.
appender Appender The appender.

Returns: Logger - The created logger.

createLogger(String name, Appender[] appenders)

public static Logger createLogger(String name, Appender[] appenders)

Creates a logger with specified name and appender.

Parameters:

Parameter Type Description
name java.lang.String The logger name.
appenders com.aspose.email.Appender[] The appender.

Returns: Logger - The created logger.

createLogger(String name, LogLevel severity, Appender appender)

public static Logger createLogger(String name, LogLevel severity, Appender appender)

Creates a logger with specified name and appender.

Parameters:

Parameter Type Description
name java.lang.String The logger name.
severity LogLevel The severity.
appender Appender The appender.

Returns: Logger - The created logger.

createLogger(String name, LogLevel severity, Appender[] appenders)

public static Logger createLogger(String name, LogLevel severity, Appender[] appenders)

Creates a logger with specified name and appender.

Parameters:

Parameter Type Description
name java.lang.String The logger name.
severity LogLevel The severity.
appenders com.aspose.email.Appender[] The appenders array.

Returns: Logger - The created logger.