Package org.openas2.logging
Class LogManager
- java.lang.Object
-
- org.openas2.logging.LogManager
-
public class LogManager extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
LogManager.DefaultManager
-
Field Summary
Fields Modifier and Type Field Description private static ConsoleLogger
DEFAULT_LOGGER
A default logger.private java.util.List<Logger>
loggers
private static boolean
registeredWithApache
private java.util.List<java.lang.String>
requestors
-
Constructor Summary
Constructors Constructor Description LogManager()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addLogger(Logger logger)
(package private) void
addRequestors(java.lang.String inName)
static LogManager
getLogManager()
static boolean
isRegisteredWithApache()
Check to confirm the logger is registered with Apache libraryvoid
log(java.lang.Throwable e, boolean terminated)
void
log(Level level, java.lang.String clazzName, java.lang.Object msg, java.lang.Throwable t)
Logs a message to the configured logging systemsvoid
setLoggers(java.util.List<Logger> listeners)
-
-
-
Field Detail
-
DEFAULT_LOGGER
private static final ConsoleLogger DEFAULT_LOGGER
A default logger. It used when no loggers are configured in config.xml
-
registeredWithApache
private static boolean registeredWithApache
-
requestors
private final java.util.List<java.lang.String> requestors
-
loggers
private java.util.List<Logger> loggers
-
-
Method Detail
-
getLogManager
public static LogManager getLogManager()
-
isRegisteredWithApache
public static boolean isRegisteredWithApache()
Check to confirm the logger is registered with Apache library- Returns:
- the registeredWithApache
-
setLoggers
public void setLoggers(java.util.List<Logger> listeners)
-
addLogger
public void addLogger(Logger logger)
-
log
public void log(@Nonnull java.lang.Throwable e, boolean terminated)
-
log
public void log(Level level, java.lang.String clazzName, @Nonnull java.lang.Object msg, java.lang.Throwable t)
Logs a message to the configured logging systems- Parameters:
level
- - current log levelclazzName
- - the name of the class that the log was generated inmsg
- - the logging object to create the message from
-
addRequestors
void addRequestors(java.lang.String inName)
- Parameters:
inName
-
-
-