Package org.atlanmod.commons.log
Class Log
- java.lang.Object
-
- org.atlanmod.commons.log.Log
-
@ThreadSafe @ParametersAreNullableByDefault public final class Log extends Object
The factory that createsLoggerinstances.It also provides static methods for logging without declaring a specific instance. In this case, the
root loggeris used by default.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voiddebug(CharSequence message)Logs a message at theDEBUGlevel, using the root logger.static voiddebug(CharSequence message, Object... params)Logs a message with parameters at theDEBUGlevel, using the root logger.static voiddebug(Object obj)Logs an object at theDEBUGlevel, using the root logger.static voiddebug(Throwable e)static voiddebug(Throwable e, CharSequence message)static voiddebug(Throwable e, CharSequence message, Object... params)static voiderror(CharSequence message)Logs a message at theERRORlevel, using the root logger.static voiderror(CharSequence message, Object... params)Logs a message with parameters at theERRORlevel, using the root logger.static voiderror(Object obj)Logs an object at theERRORlevel, using the root logger.static voiderror(Throwable e)static voiderror(Throwable e, CharSequence message)static voiderror(Throwable e, CharSequence message, Object... params)static LoggerforName(String name)Returns aLoggerwith the specified name.static voidinfo(CharSequence message)Logs a message at theINFOlevel, using the root logger.static voidinfo(CharSequence message, Object... params)Logs a message with parameters at theINFOlevel, using the root logger.static voidinfo(Object obj)Logs an object at theINFOlevel, using the root logger.static voidinfo(Throwable e)static voidinfo(Throwable e, CharSequence message)static voidinfo(Throwable e, CharSequence message, Object... params)static voidlog(Level level, CharSequence message)Logs a message at the givenlevel, using the root logger.static voidlog(Level level, CharSequence message, Object... params)Logs a message with parameters at the givenlevel, using the root logger.static voidlog(Level level, Object obj)Logs an object at the givenlevel, using the root logger.static voidlog(Level level, Throwable e)Logs the stack trace of the givenThrowableat the givenlevel, using the root logger.static voidlog(Level level, Throwable e, CharSequence message)Logs a message at the givenlevelincluding the stack trace of the givenThrowable, using the root logger.static voidlog(Level level, Throwable e, CharSequence message, Object... params)Logs a message with parameters at the givenlevelincluding the stack trace of the givenThrowable, using the root logger.static Loggerroot()Returns the rootLogger.static voidtrace(CharSequence message)Logs a message at theTRACElevel, using the root logger.static voidtrace(CharSequence message, Object... params)Logs a message with parameters at theTRACElevel, using the root logger.static voidtrace(Object obj)Logs an object at theTRACElevel, using the root logger.static voidtrace(Throwable e)static voidtrace(Throwable e, CharSequence message)static voidtrace(Throwable e, CharSequence message, Object... params)static voidwarn(CharSequence message)Logs a message at theWARNlevel, using the root logger.static voidwarn(CharSequence message, Object... params)Logs a message with parameters at theWARNlevel, using the root logger.static voidwarn(Object obj)Logs an object at theWARNlevel, using the root logger.static voidwarn(Throwable e)static voidwarn(Throwable e, CharSequence message)static voidwarn(Throwable e, CharSequence message, Object... params)
-
-
-
Method Detail
-
root
@Nonnull public static Logger root()
Returns the rootLogger.- Returns:
- the root
Logger - See Also:
forName(String)
-
forName
@Nonnull public static Logger forName(@Nonnull String name)
Returns aLoggerwith the specified name.- Parameters:
name- the logger name- Returns:
- the
Logger
-
trace
public static void trace(Object obj)
Logs an object at theTRACElevel, using the root logger.- Parameters:
obj- the object to log- See Also:
root(),Logger.trace(Object)
-
trace
public static void trace(CharSequence message)
Logs a message at theTRACElevel, using the root logger.- Parameters:
message- the message to log- See Also:
root(),Logger.trace(CharSequence)
-
trace
public static void trace(CharSequence message, Object... params)
Logs a message with parameters at theTRACElevel, using the root logger.- Parameters:
message- the message to log; the format depends on theMessageFormatparams- parameters to the message- See Also:
root(),Logger.trace(CharSequence, Object...)
-
trace
public static void trace(Throwable e)
- Parameters:
e- the exception to log, including its stack trace- See Also:
root(),Logger.trace(Throwable)
-
trace
public static void trace(Throwable e, CharSequence message)
Logs a message at theTRACElevel including the stack trace of the givenThrowable, using the root logger.- Parameters:
e- the exception to log, including its stack tracemessage- the message to log- See Also:
root(),Logger.trace(Throwable, CharSequence)
-
trace
public static void trace(Throwable e, CharSequence message, Object... params)
Logs a message with parameters at theTRACElevel including the stack trace of the givenThrowable, using the root logger.- Parameters:
e- the exception to log, including its stack tracemessage- the message to log; the format depends on theMessageFormatparams- parameters to the message- See Also:
root(),Logger.trace(Throwable, CharSequence, Object...)
-
debug
public static void debug(Object obj)
Logs an object at theDEBUGlevel, using the root logger.- Parameters:
obj- the object to log- See Also:
root(),Logger.debug(Object)
-
debug
public static void debug(CharSequence message)
Logs a message at theDEBUGlevel, using the root logger.- Parameters:
message- the message to log- See Also:
root(),Logger.debug(CharSequence)
-
debug
public static void debug(CharSequence message, Object... params)
Logs a message with parameters at theDEBUGlevel, using the root logger.- Parameters:
message- the message to log; the format depends on theMessageFormatparams- parameters to the message- See Also:
root(),Logger.debug(CharSequence, Object...)
-
debug
public static void debug(Throwable e)
- Parameters:
e- the exception to log, including its stack trace- See Also:
root(),Logger.debug(Throwable)
-
debug
public static void debug(Throwable e, CharSequence message)
Logs a message at theDEBUGlevel including the stack trace of the givenThrowable, using the root logger.- Parameters:
e- the exception to log, including its stack tracemessage- the message to log- See Also:
root(),Logger.debug(Throwable, CharSequence)
-
debug
public static void debug(Throwable e, CharSequence message, Object... params)
Logs a message with parameters at theDEBUGlevel including the stack trace of the givenThrowable, using the root logger.- Parameters:
e- the exception to log, including its stack tracemessage- the message to log; the format depends on theMessageFormatparams- parameters to the message- See Also:
root(),Logger.debug(Throwable, CharSequence, Object...)
-
info
public static void info(Object obj)
Logs an object at theINFOlevel, using the root logger.- Parameters:
obj- the object to log- See Also:
root(),Logger.info(Object)
-
info
public static void info(CharSequence message)
Logs a message at theINFOlevel, using the root logger.- Parameters:
message- the message to log- See Also:
root(),Logger.info(CharSequence)
-
info
public static void info(CharSequence message, Object... params)
Logs a message with parameters at theINFOlevel, using the root logger.- Parameters:
message- the message to log; the format depends on theMessageFormatparams- parameters to the message- See Also:
root(),Logger.info(CharSequence, Object...)
-
info
public static void info(Throwable e)
- Parameters:
e- the exception to log, including its stack trace- See Also:
root(),Logger.info(Throwable)
-
info
public static void info(Throwable e, CharSequence message)
Logs a message at theINFOlevel including the stack trace of the givenThrowable, using the root logger.- Parameters:
e- the exception to log, including its stack tracemessage- the message to log- See Also:
root(),Logger.info(Throwable, CharSequence)
-
info
public static void info(Throwable e, CharSequence message, Object... params)
Logs a message with parameters at theINFOlevel including the stack trace of the givenThrowable, using the root logger.- Parameters:
e- the exception to log, including its stack tracemessage- the message to log; the format depends on theMessageFormatparams- parameters to the message- See Also:
root(),Logger.info(Throwable, CharSequence, Object...)
-
warn
public static void warn(Object obj)
Logs an object at theWARNlevel, using the root logger.- Parameters:
obj- the object to log- See Also:
root(),Logger.warn(Object)
-
warn
public static void warn(CharSequence message)
Logs a message at theWARNlevel, using the root logger.- Parameters:
message- the message to log- See Also:
root(),Logger.warn(CharSequence)
-
warn
public static void warn(CharSequence message, Object... params)
Logs a message with parameters at theWARNlevel, using the root logger.- Parameters:
message- the message to log; the format depends on theMessageFormatparams- parameters to the message- See Also:
root(),Logger.warn(CharSequence, Object...)
-
warn
public static void warn(Throwable e)
- Parameters:
e- the exception to log, including its stack trace- See Also:
root(),Logger.warn(Throwable)
-
warn
public static void warn(Throwable e, CharSequence message)
Logs a message at theWARNlevel including the stack trace of the givenThrowable, using the root logger.- Parameters:
e- the exception to log, including its stack tracemessage- the message to log- See Also:
root(),Logger.warn(Throwable, CharSequence)
-
warn
public static void warn(Throwable e, CharSequence message, Object... params)
Logs a message with parameters at theWARNlevel including the stack trace of the givenThrowable, using the root logger.- Parameters:
e- the exception to log, including its stack tracemessage- the message to log; the format depends on theMessageFormatparams- parameters to the message- See Also:
root(),Logger.warn(Throwable, CharSequence, Object...)
-
error
public static void error(Object obj)
Logs an object at theERRORlevel, using the root logger.- Parameters:
obj- the object to log- See Also:
root(),Logger.error(Object)
-
error
public static void error(CharSequence message)
Logs a message at theERRORlevel, using the root logger.- Parameters:
message- the message to log- See Also:
root(),Logger.error(CharSequence)
-
error
public static void error(CharSequence message, Object... params)
Logs a message with parameters at theERRORlevel, using the root logger.- Parameters:
message- the message to log; the format depends on theMessageFormatparams- parameters to the message- See Also:
root(),Logger.error(CharSequence, Object...)
-
error
public static void error(Throwable e)
- Parameters:
e- the exception to log, including its stack trace- See Also:
root(),Logger.error(Throwable)
-
error
public static void error(Throwable e, CharSequence message)
Logs a message at theERRORlevel including the stack trace of the givenThrowable, using the root logger.- Parameters:
e- the exception to log, including its stack tracemessage- the message to log- See Also:
root(),Logger.error(Throwable, CharSequence)
-
error
public static void error(Throwable e, CharSequence message, Object... params)
Logs a message with parameters at theERRORlevel including the stack trace of the givenThrowable, using the root logger.- Parameters:
e- the exception to log, including its stack tracemessage- the message to log; the format depends on theMessageFormatparams- parameters to the message- See Also:
root(),Logger.error(Throwable, CharSequence, Object...)
-
log
public static void log(@Nonnull Level level, Object obj)Logs an object at the givenlevel, using the root logger.- Parameters:
level- the logging levelobj- the object to log- See Also:
root(),Logger.log(Level, Object)
-
log
public static void log(@Nonnull Level level, CharSequence message)Logs a message at the givenlevel, using the root logger.- Parameters:
level- the logging levelmessage- the message to log- See Also:
root(),Logger.log(Level, CharSequence)
-
log
public static void log(@Nonnull Level level, CharSequence message, Object... params)Logs a message with parameters at the givenlevel, using the root logger.- Parameters:
level- the logging levelmessage- the message to log; the format depends on theMessageFormatparams- parameters to the message- See Also:
root(),Logger.log(Level, CharSequence, Object...)
-
log
public static void log(@Nonnull Level level, Throwable e)Logs the stack trace of the givenThrowableat the givenlevel, using the root logger.- Parameters:
level- the logging levele- the exception to log, including its stack trace- See Also:
root(),Logger.log(Level, Throwable)
-
log
public static void log(@Nonnull Level level, Throwable e, CharSequence message)Logs a message at the givenlevelincluding the stack trace of the givenThrowable, using the root logger.- Parameters:
level- the logging levele- the exception to log, including its stack tracemessage- the message to log- See Also:
root(),Logger.log(Level, Throwable, CharSequence)
-
log
public static void log(@Nonnull Level level, Throwable e, CharSequence message, Object... params)Logs a message with parameters at the givenlevelincluding the stack trace of the givenThrowable, using the root logger.- Parameters:
level- the logging levele- the exception to log, including its stack tracemessage- the message to log; the format depends on theMessageFormatparams- parameters to the message- See Also:
root(),Logger.log(Level, Throwable, CharSequence, Object...)
-
-