public class CommandLineLoggerService extends java.lang.Object implements LoggerService, Logger
Modifier and Type | Class and Description |
---|---|
static class |
CommandLineLoggerService.Level
The various levels the debugger can log at
|
SECURITY_LOG
Constructor and Description |
---|
CommandLineLoggerService()
Constructs a new
CommandLineLoggerService that will not print
stack traces when exceptions are presented and with level set to
Level.INFO. |
Modifier and Type | Method and Description |
---|---|
void |
cleanup()
AppContext is being closed. |
void |
debug(java.lang.Object message) |
void |
debug(java.lang.Object message,
java.lang.Throwable t) |
void |
error(java.lang.Object message) |
void |
error(java.lang.Object message,
java.lang.Throwable t) |
void |
fatal(java.lang.Object message) |
void |
fatal(java.lang.Object message,
java.lang.Throwable t) |
Logger |
getLogger(java.lang.Class c) |
Logger |
getLogger(java.lang.String name) |
java.lang.Class<? super LoggerService> |
getType()
Returns the type of service the class should be registered under.
|
void |
info(java.lang.Object message) |
void |
info(java.lang.Object message,
java.lang.Throwable t) |
void |
printMessages(boolean b)
Sets whether or not this logger prints the exception message when it's logging
messages are passed exceptions
|
void |
printStackTraces(boolean b)
Sets whether or not this logger prints stack traces when it's logging
messages are passed exceptions
|
void |
setLevel(CommandLineLoggerService.Level level)
Sets the level at which this logger logs
|
void |
warn(java.lang.Object message) |
void |
warn(java.lang.Object message,
java.lang.Throwable t) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
initialiseLogging, securityEvent, securityEvent, shutdownLogging
public CommandLineLoggerService()
CommandLineLoggerService
that will not print
stack traces when exceptions are presented and with level set to
Level.INFO.public void printStackTraces(boolean b)
b
- If true
stack traces will be printed. If
false
they won'tpublic void printMessages(boolean b)
b
- If true
message will be printed. If
false
they won'tpublic void setLevel(CommandLineLoggerService.Level level)
level
- The level at which this logger logspublic Logger getLogger(java.lang.String name)
getLogger
in interface LoggerService
public Logger getLogger(java.lang.Class c)
getLogger
in interface LoggerService
public void debug(java.lang.Object message, java.lang.Throwable t)
public void error(java.lang.Object message, java.lang.Throwable t)
public void fatal(java.lang.Object message, java.lang.Throwable t)
public void info(java.lang.Object message, java.lang.Throwable t)
public void warn(java.lang.Object message, java.lang.Throwable t)
public void cleanup()
AppContextCleanup
AppContext
is being closed.
Only use this for cleanup that can't be handled by
normal garbage collection or for state which is never returned by reference.cleanup
in interface AppContextCleanup
public java.lang.Class<? super LoggerService> getType()
AppContextService
getType
in interface AppContextService<LoggerService>