com.levigo.util.log.qualified
Class AbstractQualifiedLogger

java.lang.Object
  extended by com.levigo.util.log.qualified.AbstractQualifiedLogger
All Implemented Interfaces:
Logger, QualifiedLogger

public abstract class AbstractQualifiedLogger
extends Object
implements QualifiedLogger, Logger


Field Summary
 
Fields inherited from interface com.levigo.util.log.Logger
ROOT_LOGGER_NAME
 
Constructor Summary
AbstractQualifiedLogger()
           
 
Method Summary
static String assembleMessageId(MessageID messageId)
           
 void debug(String msg, Object... args)
          Log the given message at level "debug".
 void debug(String msg, Throwable t, Object... args)
          Log the given message at level "debug".
protected  boolean doResolveMessages()
           
 void error(MessageID msgId)
          Log the given message at level "error".
 void error(MessageID msgId, Object... args)
          Log the given message at level "error".
 void error(MessageID msgId, Throwable t)
          Log the given message at level "error".
 void error(MessageID msgId, Throwable t, Object... args)
          Log the given message at level "error".
 void fatal(MessageID msgId)
          Log the given message at level "fatal".
 void fatal(MessageID msgId, Object... args)
          Log the given message at level "fatal".
 void fatal(MessageID msgId, Throwable t)
          Log the given message at level "fatal".
 void fatal(MessageID msgId, Throwable t, Object... args)
          Log the given message at level "fatal".
protected  void fireErrorEvent(QualifiedLogEvent event, Throwable t)
           
protected  void fireFatalEvent(QualifiedLogEvent event, Throwable t)
           
protected  void fireWarningEvent(QualifiedLogEvent event, Throwable t)
           
protected  String getLogMessageForEvent(QualifiedLogEvent event)
          generates (or retrieves) a log message for a particular event.
 void info(String msg, Object... args)
          Log the given message at level "info".
 void info(String msg, Throwable t, Object... args)
          Log the given message at level "debug".
 boolean isErrorEnabled()
          Return whether the "error" (or higher) level is enabled
 boolean isFatalEnabled()
          Return whether the "fatal" level is enabled
 boolean isWarnEnabled()
          Return whether the "warning" (or higher) level is enabled
 void trace(String msg, Object... args)
          Log the given message at level "trace".
 void trace(String msg, Throwable t, Object... args)
          Log the given message at level "trace".
 void warn(MessageID msgId)
          Log the given message at level "warning".
 void warn(MessageID msgId, Object... args)
          Log the given message at level "warning".
 void warn(MessageID msgId, Throwable t)
          Log the given message at level "warning".
 void warn(MessageID msgId, Throwable t, Object... args)
          Log the given message at level "warning".
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.levigo.util.log.qualified.QualifiedLogger
debug, debug, getName, info, info, isDebugEnabled, isInfoEnabled, isTraceEnabled, trace, trace
 
Methods inherited from interface com.levigo.util.log.Logger
debug, debug, error, error, fatal, fatal, getName, info, info, isDebugEnabled, isInfoEnabled, isTraceEnabled, trace, trace, warn, warn
 

Constructor Detail

AbstractQualifiedLogger

public AbstractQualifiedLogger()
Method Detail

assembleMessageId

public static String assembleMessageId(MessageID messageId)

fireErrorEvent

protected void fireErrorEvent(QualifiedLogEvent event,
                              Throwable t)

getLogMessageForEvent

protected String getLogMessageForEvent(QualifiedLogEvent event)
generates (or retrieves) a log message for a particular event. This Method may NEVER RETURN NULL

Parameters:
event -
Returns:
the appropriate log message
Throws:
NullPointerException - if event is null

doResolveMessages

protected boolean doResolveMessages()

fireWarningEvent

protected void fireWarningEvent(QualifiedLogEvent event,
                                Throwable t)

fireFatalEvent

protected void fireFatalEvent(QualifiedLogEvent event,
                              Throwable t)

debug

public void debug(String msg,
                  Object... args)
Description copied from interface: QualifiedLogger
Log the given message at level "debug". Interpolate the given arguments into the message using a MessageFormat.

Specified by:
debug in interface QualifiedLogger
Parameters:
msg - the message
args - the arguments

debug

public void debug(String msg,
                  Throwable t,
                  Object... args)
Description copied from interface: QualifiedLogger
Log the given message at level "debug". Interpolate the given arguments into the message using a MessageFormat.

Specified by:
debug in interface QualifiedLogger
Parameters:
msg - the message
t - the Throwable related to the event.
args - the arguments

info

public void info(String msg,
                 Object... args)
Description copied from interface: QualifiedLogger
Log the given message at level "info". Interpolate the given arguments into the message using a MessageFormat.

Specified by:
info in interface QualifiedLogger
Parameters:
msg - the message
args - the arguments

info

public void info(String msg,
                 Throwable t,
                 Object... args)
Description copied from interface: QualifiedLogger
Log the given message at level "debug". Interpolate the given arguments into the message using a MessageFormat.

Specified by:
info in interface QualifiedLogger
Parameters:
msg - the message
t - the Throwable related to the event.
args - the arguments

trace

public void trace(String msg,
                  Object... args)
Description copied from interface: QualifiedLogger
Log the given message at level "trace". Interpolate the given arguments into the message using a MessageFormat.

Specified by:
trace in interface QualifiedLogger
Parameters:
msg - the message
args - the arguments

trace

public void trace(String msg,
                  Throwable t,
                  Object... args)
Description copied from interface: QualifiedLogger
Log the given message at level "trace". Interpolate the given arguments into the message using a MessageFormat.

Specified by:
trace in interface QualifiedLogger
Parameters:
msg - the message
t - the Throwable related to the event.
args - the arguments

error

public void error(MessageID msgId)
Description copied from interface: QualifiedLogger
Log the given message at level "error".

Specified by:
error in interface QualifiedLogger
Parameters:
msgId - the message

error

public void error(MessageID msgId,
                  Throwable t)
Description copied from interface: QualifiedLogger
Log the given message at level "error". Interpolate the given arguments into the message using a MessageFormat.

Specified by:
error in interface QualifiedLogger
Parameters:
msgId - the message
t - the Throwable related to the event.

error

public void error(MessageID msgId,
                  Object... args)
Description copied from interface: QualifiedLogger
Log the given message at level "error".

Specified by:
error in interface QualifiedLogger
Parameters:
msgId - the message
args - the arguments

error

public void error(MessageID msgId,
                  Throwable t,
                  Object... args)
Description copied from interface: QualifiedLogger
Log the given message at level "error". Interpolate the given arguments into the message using a MessageFormat.

Specified by:
error in interface QualifiedLogger
Parameters:
msgId - the message
t - the Throwable related to the event.
args - the arguments

fatal

public void fatal(MessageID msgId)
Description copied from interface: QualifiedLogger
Log the given message at level "fatal".

Specified by:
fatal in interface QualifiedLogger
Parameters:
msgId - the message

fatal

public void fatal(MessageID msgId,
                  Throwable t)
Description copied from interface: QualifiedLogger
Log the given message at level "fatal". Interpolate the given arguments into the message using a MessageFormat.

Specified by:
fatal in interface QualifiedLogger
Parameters:
msgId - the message
t - the Throwable related to the event.

fatal

public void fatal(MessageID msgId,
                  Object... args)
Description copied from interface: QualifiedLogger
Log the given message at level "fatal".

Specified by:
fatal in interface QualifiedLogger
Parameters:
msgId - the message
args - the arguments

fatal

public void fatal(MessageID msgId,
                  Throwable t,
                  Object... args)
Description copied from interface: QualifiedLogger
Log the given message at level "fatal". Interpolate the given arguments into the message using a MessageFormat.

Specified by:
fatal in interface QualifiedLogger
Parameters:
msgId - the message
t - the Throwable related to the event.
args - the arguments

warn

public void warn(MessageID msgId)
Description copied from interface: QualifiedLogger
Log the given message at level "warning".

Specified by:
warn in interface QualifiedLogger
Parameters:
msgId - the message

warn

public void warn(MessageID msgId,
                 Throwable t)
Description copied from interface: QualifiedLogger
Log the given message at level "warning". Interpolate the given arguments into the message using a MessageFormat.

Specified by:
warn in interface QualifiedLogger
Parameters:
msgId - the message
t - the Throwable related to the event.

warn

public void warn(MessageID msgId,
                 Object... args)
Description copied from interface: QualifiedLogger
Log the given message at level "warning".

Specified by:
warn in interface QualifiedLogger
Parameters:
msgId - the message
args - the arguments

warn

public void warn(MessageID msgId,
                 Throwable t,
                 Object... args)
Description copied from interface: QualifiedLogger
Log the given message at level "warning". Interpolate the given arguments into the message using a MessageFormat.

Specified by:
warn in interface QualifiedLogger
Parameters:
msgId - the message
t - the Throwable related to the event.
args - the arguments

isFatalEnabled

public boolean isFatalEnabled()
Description copied from interface: QualifiedLogger
Return whether the "fatal" level is enabled

Specified by:
isFatalEnabled in interface Logger
Specified by:
isFatalEnabled in interface QualifiedLogger
Returns:
true if enabled

isErrorEnabled

public boolean isErrorEnabled()
Description copied from interface: QualifiedLogger
Return whether the "error" (or higher) level is enabled

Specified by:
isErrorEnabled in interface Logger
Specified by:
isErrorEnabled in interface QualifiedLogger
Returns:
true if enabled

isWarnEnabled

public boolean isWarnEnabled()
Description copied from interface: QualifiedLogger
Return whether the "warning" (or higher) level is enabled

Specified by:
isWarnEnabled in interface Logger
Specified by:
isWarnEnabled in interface QualifiedLogger
Returns:
true if enabled


Copyright © 1995-2020 levigo holding gmbh. All Rights Reserved.