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 classLogManager.DefaultManager
-
Field Summary
Fields Modifier and Type Field Description private static ConsoleLoggerDEFAULT_LOGGERA default logger.private java.util.List<Logger>loggersprivate static booleanregisteredWithApacheprivate 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 voidaddLogger(Logger logger)(package private) voidaddRequestors(java.lang.String inName)static LogManagergetLogManager()static booleanisRegisteredWithApache()Check to confirm the logger is registered with Apache libraryvoidlog(java.lang.Throwable e, boolean terminated)voidlog(Level level, java.lang.String clazzName, java.lang.Object msg, java.lang.Throwable t)Logs a message to the configured logging systemsvoidsetLoggers(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-
-
-