
public abstract class AbstractWaarpLogger extends Object implements WaarpLogger, Serializable
WaarpLogger. This class implements all
 methods that have a
 WaarpLogLevel parameter by default to call specific logger methods
 such as WaarpLogger.info(String) or
 WaarpLogger.isInfoEnabled().| Modifier | Constructor and Description | 
|---|---|
protected  | 
AbstractWaarpLogger(String name)
Creates a new instance. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
debug(Throwable t)
Log an exception (throwable) at the DEBUG level. 
 | 
void | 
error(Throwable t)
Log an exception (throwable) at the ERROR level. 
 | 
static String | 
getImmediateMethodAndLine()
To be used in message for logger (rank 2) like
 logger.warn(code,"message:"+getImmediateMethodAndLine(),null); 
 | 
static String | 
getLoggerMethodAndLine()
To be used only by Logger (rank 5) 
 | 
static String | 
getLoggerMethodAndLineCallee(int deep)
To be used only by Logger (rank 5) 
 | 
protected static String | 
getRankMethodAndLine(int rank)  | 
void | 
info(Throwable t)
Log an exception (throwable) at the INFO level. 
 | 
boolean | 
isEnabled(WaarpLogLevel level)
Is the logger instance enabled for the specified  
level? | 
void | 
log(WaarpLogLevel level,
   String msg)
Log a message at the specified  
level. | 
void | 
log(WaarpLogLevel level,
   String format,
   Object... arguments)
Log a message at the specified  
level according to the specified
 format and arguments. | 
void | 
log(WaarpLogLevel level,
   String format,
   Object arg)
Log a message at the specified  
level according to the specified
 format and argument. | 
void | 
log(WaarpLogLevel level,
   String format,
   Object argA,
   Object argB)
Log a message at the specified  
level according to the specified
 format and arguments. | 
void | 
log(WaarpLogLevel level,
   String msg,
   Throwable cause)
Log an exception (throwable) at the specified  
level with an
 accompanying message. | 
void | 
log(WaarpLogLevel level,
   Throwable cause)
Log an exception (throwable) at the specified  
level. | 
String | 
name()
Return the name of this  
WaarpLogger instance. | 
protected Object | 
readResolve()  | 
static String | 
simpleClassName(Class<?> clazz)  | 
static String | 
simpleClassName(Object o)  | 
String | 
toString()  | 
void | 
trace(Throwable t)
Log an exception (throwable) at the TRACE level. 
 | 
void | 
warn(Throwable t)
Log an exception (throwable) at the WARN level. 
 | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdebug, debug, debug, debug, debug, error, error, error, error, error, info, info, info, info, info, isDebugEnabled, isErrorEnabled, isInfoEnabled, isTraceEnabled, isWarnEnabled, junit, setLevel, trace, trace, trace, trace, trace, warn, warn, warn, warn, warnprotected AbstractWaarpLogger(String name)
public final String name()
WaarpLoggerWaarpLogger instance.name in interface WaarpLoggerpublic final boolean isEnabled(WaarpLogLevel level)
WaarpLoggerlevel?isEnabled in interface WaarpLoggerlevel,
     false otherwise.public final void trace(Throwable t)
WaarpLoggertrace in interface WaarpLoggert - the exception (throwable) to logpublic final void debug(Throwable t)
WaarpLoggerdebug in interface WaarpLoggert - the exception (throwable) to logpublic final void info(Throwable t)
WaarpLoggerinfo in interface WaarpLoggert - the exception (throwable) to logpublic final void warn(Throwable t)
WaarpLoggerwarn in interface WaarpLoggert - the exception (throwable) to logpublic final void error(Throwable t)
WaarpLoggererror in interface WaarpLoggert - the exception (throwable) to logpublic final void log(WaarpLogLevel level, String msg, Throwable cause)
WaarpLoggerlevel with an
 accompanying message.log in interface WaarpLoggermsg - the message accompanying the exceptioncause - the exception (throwable) to logpublic final void log(WaarpLogLevel level, Throwable cause)
WaarpLoggerlevel.log in interface WaarpLoggercause - the exception (throwable) to logpublic final void log(WaarpLogLevel level, String msg)
WaarpLoggerlevel.log in interface WaarpLoggermsg - the message string to be loggedpublic final void log(WaarpLogLevel level, String format, Object arg)
WaarpLoggerlevel according to the specified
 format and argument.
 
 
 This form avoids superfluous object creation when the logger is disabled
 for the specified level.
 
log in interface WaarpLoggerformat - the format stringarg - the argumentpublic final void log(WaarpLogLevel level, String format, Object argA, Object argB)
WaarpLoggerlevel according to the specified
 format and arguments.
 
 
 This form avoids superfluous object creation when the logger is disabled
 for the specified level.
 
log in interface WaarpLoggerformat - the format stringargA - the first argumentargB - the second argumentpublic final void log(WaarpLogLevel level, String format, Object... arguments)
WaarpLoggerlevel according 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 an
 Object[] before invoking the method, even if this logger is
 disabled for the specified
 level. The variants taking one and
 two arguments exist
 solely in order to avoid this
 hidden cost.
 
log in interface WaarpLoggerformat - the format stringarguments - a list of 3 or more argumentsprotected final Object readResolve()
public static String simpleClassName(Object o)
o - public static String simpleClassName(Class<?> clazz)
clazz - public static String getImmediateMethodAndLine()
public static String getLoggerMethodAndLine()
public static String getLoggerMethodAndLineCallee(int deep)
protected static String getRankMethodAndLine(int rank)
rank - is the current depth of call+1 (immediate = 1+1=2)Copyright © 2009–2022 Waarp. All rights reserved.