com.groiss.log
Class NamedLogger

java.lang.Object
  extended by com.groiss.log.NamedLogger

public class NamedLogger
extends java.lang.Object

Wrapper class for Logger that adds referrer information (logger name) to the log entry.

Author:
Sergiy Shyrkov
See Also:
Logger

Constructor Summary
NamedLogger(java.lang.Class clazz)
          Initializes an instance of this class.
NamedLogger(java.lang.String name)
          Initializes an instance of this class.
 
Method Summary
 void debug(java.lang.String message)
          Logs the specified message with a debug level.
 void error(java.lang.String message, java.lang.Throwable ex)
          Logs the specified error.
 void error(java.lang.Throwable ex)
          Logs the specified error.
 void info(java.lang.String message)
          Logs the specified message with an info level.
 boolean isDebugEnabled()
          Returns true if the logger level allows debug logging.
 void trace(java.lang.String message)
          Logs the specified message with a trace level.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NamedLogger

public NamedLogger(java.lang.Class clazz)
Initializes an instance of this class.

Parameters:
clazz - the the logger class

NamedLogger

public NamedLogger(java.lang.String name)
Initializes an instance of this class.

Parameters:
name - the logger name
Method Detail

debug

public void debug(java.lang.String message)
Logs the specified message with a debug level.

Parameters:
message - the message to be logged

error

public void error(java.lang.String message,
                  java.lang.Throwable ex)
Logs the specified error.

Parameters:
message - the message to be logged
ex - the error object to be logged

error

public void error(java.lang.Throwable ex)
Logs the specified error.

Parameters:
ex - the error object to be logged

info

public void info(java.lang.String message)
Logs the specified message with an info level.

Parameters:
message - the message to be logged

isDebugEnabled

public boolean isDebugEnabled()
Returns true if the logger level allows debug logging.

Returns:
true if the logger level allows debug logging

trace

public void trace(java.lang.String message)
Logs the specified message with a trace level.

Parameters:
message - the message to be logged


Copyright © 2001-2006 Groiss Informatics GmbH. All Rights Reserved.