Package fr.gouv.vitam.common.logging
Class AbstractVitamLogger
java.lang.Object
fr.gouv.vitam.common.logging.AbstractVitamLogger
- All Implemented Interfaces:
VitamLogger,Serializable
This class implements all methods that have a
Inspired from Netty A skeletal implementation of
VitamLogLevel parameter by default to call specific logger
methods such as VitamLogger.info(String) or VitamLogger.isInfoEnabled(). Inspired from Netty A skeletal implementation of
VitamLogger- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidLog an exception (throwable) at the DEBUG level.voidLog an exception (throwable) at the ERROR level.voidLog an exception (throwable) at the INFO level.booleanisEnabled(VitamLogLevel level) Is the logger instance enabled for the specifiedlevel?voidlog(VitamLogLevel level, String msg) Log a message at the specifiedlevel.voidlog(VitamLogLevel level, String format, Object arg) Log a message at the specifiedlevelaccording to the specified format and argument.voidlog(VitamLogLevel level, String format, Object... arguments) Log a message at the specifiedlevelaccording to the specified format and arguments.voidlog(VitamLogLevel level, String format, Object argA, Object argB) Log a message at the specifiedlevelaccording to the specified format and arguments.voidlog(VitamLogLevel level, String msg, Throwable cause) Log an exception (throwable) at the specifiedlevelwith an accompanying message.voidlog(VitamLogLevel level, Throwable cause) Log an exception (throwable) at the specifiedlevel.name()Return the name of thisVitamLoggerinstance.protected Objectstatic final StringsimpleClassName(Class<?> clazz) static final StringtoString()voidLog an exception (throwable) at the TRACE level.voidLog an exception (throwable) at the WARN level.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface fr.gouv.vitam.common.logging.VitamLogger
debug, debug, debug, debug, debug, error, error, error, error, error, getLevel, info, info, info, info, info, isDebugEnabled, isErrorEnabled, isInfoEnabled, isTraceEnabled, isWarnEnabled, setLevel, timeInfo, timeInfo, trace, trace, trace, trace, trace, warn, warn, warn, warn, warn
-
Constructor Details
-
AbstractVitamLogger
Creates a new instance.
-
-
Method Details
-
name
Description copied from interface:VitamLoggerReturn the name of thisVitamLoggerinstance.- Specified by:
namein interfaceVitamLogger- Returns:
- name of this logger instance
-
isEnabled
Description copied from interface:VitamLoggerIs the logger instance enabled for the specifiedlevel?- Specified by:
isEnabledin interfaceVitamLogger- Returns:
- True if this Logger is enabled for the specified
level, false otherwise.
-
trace
Description copied from interface:VitamLoggerLog an exception (throwable) at the TRACE level.- Specified by:
tracein interfaceVitamLogger- Parameters:
t- the exception (throwable) to log
-
debug
Description copied from interface:VitamLoggerLog an exception (throwable) at the DEBUG level.- Specified by:
debugin interfaceVitamLogger- Parameters:
t- the exception (throwable) to log
-
info
Description copied from interface:VitamLoggerLog an exception (throwable) at the INFO level.- Specified by:
infoin interfaceVitamLogger- Parameters:
t- the exception (throwable) to log
-
warn
Description copied from interface:VitamLoggerLog an exception (throwable) at the WARN level.- Specified by:
warnin interfaceVitamLogger- Parameters:
t- the exception (throwable) to log
-
error
Description copied from interface:VitamLoggerLog an exception (throwable) at the ERROR level.- Specified by:
errorin interfaceVitamLogger- Parameters:
t- the exception (throwable) to log
-
log
Description copied from interface:VitamLoggerLog an exception (throwable) at the specifiedlevelwith an accompanying message.- Specified by:
login interfaceVitamLoggermsg- the message accompanying the exceptioncause- the exception (throwable) to log
-
log
Description copied from interface:VitamLoggerLog an exception (throwable) at the specifiedlevel.- Specified by:
login interfaceVitamLoggercause- the exception (throwable) to log
-
log
Description copied from interface:VitamLoggerLog a message at the specifiedlevel.- Specified by:
login interfaceVitamLoggermsg- the message string to be logged
-
log
Description copied from interface:VitamLoggerLog a message at the specifiedlevelaccording to the specified format and argument.This form avoids superfluous object creation when the logger is disabled for the specified
level.- Specified by:
login interfaceVitamLoggerformat- the format stringarg- the argument
-
log
Description copied from interface:VitamLoggerLog a message at the specifiedlevelaccording to the specified format and arguments.This form avoids superfluous object creation when the logger is disabled for the specified
level.- Specified by:
login interfaceVitamLoggerformat- the format stringargA- the first argumentargB- the second argument
-
log
Description copied from interface:VitamLoggerLog a message at the specifiedlevelaccording to the specified format and arguments.This form avoids superfluous string concatenation when the logger is disabled for the specified
level. However, this variant incurs the hidden (and relatively small) cost of creating anObject[]before invoking the method, even if this logger is disabled for the specifiedlevel. The variants takingoneandtwoarguments exist solely in order to avoid this hidden cost.- Specified by:
login interfaceVitamLoggerformat- the format stringarguments- a list of 3 or more arguments
-
readResolve
- Throws:
ObjectStreamException
-
simpleClassName
- Parameters:
o- the object to get its class name- Returns:
- the simple Class Name
-
simpleClassName
- Parameters:
clazz- instance of a class- Returns:
- the simple Class Name
-
toString
-