com.aragost.javahg.log
Class JULLogger

java.lang.Object
  extended by com.aragost.javahg.log.JULLogger
All Implemented Interfaces:
Logger

public class JULLogger
extends Object
implements Logger

This simulates the Logger class from slf4j.

Only the methods that is actually used by JavaHg is implemented, but others will be added as needed.

Implementation note: In general for log level abc there is an void abc(String msg) and void abc(String msg, Object[] args). The first simply writes the message to the backend with no formatting, the second will do a formatting similar to slf4j. The first is strictly not needed, but the consequence would be that for even simple log messages a temp array would be created for the varargs.


Constructor Summary
JULLogger(String name)
           
 
Method Summary
 void debug(String msg)
          Logs a debugging message - detailed debugging information that can be used for identifying problems without a debugger, e.g.
 void debug(String msg, Object... args)
          Logs a debugging message - detailed debugging information that can be used for identifying problems without a debugger, e.g.
 void debug(String msg, Throwable thrown)
           
 void error(String msg)
           
 void error(String msg, Object... args)
           
 void error(String msg, Throwable thrown)
           
 void info(String msg)
          Logs an informational message - information about application progress, e.g.
 void info(String msg, Object... args)
           
 void info(String msg, Throwable thrown)
           
 boolean isDebugEnabled()
           
 boolean isErrorEnabled()
           
 boolean isInfoEnabled()
           
 boolean isWarnEnabled()
           
 void warn(String msg)
           
 void warn(String msg, Object... args)
           
 void warn(String msg, Throwable thrown)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JULLogger

public JULLogger(String name)
Method Detail

debug

public void debug(String msg)
Description copied from interface: Logger
Logs a debugging message - detailed debugging information that can be used for identifying problems without a debugger, e.g. entry/exit points, user errors, recoverable errors, algorithm steps. The application performance is significantly reduced when this logging level is enabled. Not for production use.

Specified by:
debug in interface Logger
Parameters:
msg - The message to log.

debug

public void debug(String msg,
                  Object... args)
Description copied from interface: Logger
Logs a debugging message - detailed debugging information that can be used for identifying problems without a debugger, e.g. entry/exit points, user errors, recoverable errors, algorithm steps. The application performance is significantly reduced when this logging level is enabled. Not for production use.

Specified by:
debug in interface Logger
Parameters:
msg - The message to log.

debug

public void debug(String msg,
                  Throwable thrown)
Specified by:
debug in interface Logger

info

public void info(String msg)
Description copied from interface: Logger
Logs an informational message - information about application progress, e.g. configuration values, service startup/shutdown.

Specified by:
info in interface Logger

info

public void info(String msg,
                 Object... args)
Specified by:
info in interface Logger

info

public void info(String msg,
                 Throwable thrown)
Specified by:
info in interface Logger

warn

public void warn(String msg)
Specified by:
warn in interface Logger

warn

public void warn(String msg,
                 Object... args)
Specified by:
warn in interface Logger

warn

public void warn(String msg,
                 Throwable thrown)
Specified by:
warn in interface Logger

error

public void error(String msg)
Specified by:
error in interface Logger

error

public void error(String msg,
                  Object... args)
Specified by:
error in interface Logger

error

public void error(String msg,
                  Throwable thrown)
Specified by:
error in interface Logger

isDebugEnabled

public boolean isDebugEnabled()
Specified by:
isDebugEnabled in interface Logger

isInfoEnabled

public boolean isInfoEnabled()
Specified by:
isInfoEnabled in interface Logger

isWarnEnabled

public boolean isWarnEnabled()
Specified by:
isWarnEnabled in interface Logger

isErrorEnabled

public boolean isErrorEnabled()
Specified by:
isErrorEnabled in interface Logger


Copyright © 2011-2013 aragost Trifork ag. All Rights Reserved.