net.sf.wraplog
Class SunLogger

java.lang.Object
  extended bynet.sf.wraplog.AbstractLogger
      extended bynet.sf.wraplog.SunLogger

public class SunLogger
extends AbstractLogger

Logger using java.util.logging.Logger.

Author:
Thomas Aglassinger
See Also:
Logger

Constructor Summary
SunLogger(String name)
           
 
Method Summary
 int getLevel()
           
static SunLogger getLogger(String name)
           
 boolean isEnabled(int level)
           
protected  void reallyLog(int logLevel, String message, Throwable error)
          Log a message and optional error details.
 void setLevel(int newLevel)
           
 
Methods inherited from class net.sf.wraplog.AbstractLogger
checkLevel, debug, debug, debug, debug, error, error, error, error, getLoggedMessageCount, handleError, handleError, info, info, info, info, isDebugEnabled, isErrorEnabled, isInfoEnabled, isWarnEnabled, log, log, log, log, setLoggingErrorHandler, warn, warn, warn, warn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SunLogger

public SunLogger(String name)
Method Detail

getLogger

public static SunLogger getLogger(String name)

reallyLog

protected void reallyLog(int logLevel,
                         String message,
                         Throwable error)
                  throws Exception
Description copied from class: AbstractLogger
Log a message and optional error details.

Specified by:
reallyLog in class AbstractLogger
Parameters:
logLevel - one of: Level.DEBUG, Level.INFO, Level.WARN, Level.ERROR
message - the actual message; this will never be null
error - an error that is related to the message; unless null, the name and stack trace of the error are logged
Throws:
Exception

isEnabled

public boolean isEnabled(int level)
Overrides:
isEnabled in class AbstractLogger

setLevel

public void setLevel(int newLevel)
Overrides:
setLevel in class AbstractLogger

getLevel

public int getLevel()
Overrides:
getLevel in class AbstractLogger