org.ow2.petals.jbi.messaging.exchange
Class LoggingUtil

java.lang.Object
  extended by org.ow2.petals.jbi.messaging.exchange.LoggingUtil

public class LoggingUtil
extends java.lang.Object

Monolog logger implementation. This class is used to format various logs. it can be used as a static class or as a wrapper object of a logger. The methods add to the resulting message a "ClassName-MethodName" information. (only for DEBUG and INFO level) TODO : Rename to MonologLogger and move to kernel implementation

Author:
alouis

Field Summary
protected  java.util.logging.Logger log
           
protected  java.lang.String name
           
 
Constructor Summary
LoggingUtil(java.util.logging.Logger logger)
          Creates a new instance of LoggingUtil
LoggingUtil(java.util.logging.Logger logger, java.lang.String loggerName)
          Creates a new instance of LoggingUtil
 
Method Summary
 void call()
          
 void call(java.lang.Object msg)
          
 void debug(java.lang.Object message)
          
 void end()
          
 void end(java.lang.Object msg)
          
 void error(java.lang.Object message)
          
 void error(java.lang.Object message, java.lang.Throwable throwable)
          
 java.util.logging.Logger getLogger()
           
 java.lang.String getName()
          
 void info(java.lang.Object message)
          
 void info(java.lang.Object message, java.lang.Throwable error)
          
 boolean isDebugEnabled()
          
 boolean isErrorEnabled()
          
 boolean isInfoEnabled()
          
 boolean isWarnEnabled()
          
 void start()
          
 void start(java.lang.Object msg)
          
 void warning(java.lang.Object message)
          
 void warning(java.lang.Object message, java.lang.Throwable throwable)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected java.util.logging.Logger log

name

protected java.lang.String name
Constructor Detail

LoggingUtil

public LoggingUtil(java.util.logging.Logger logger)
Creates a new instance of LoggingUtil

Parameters:
logger -

LoggingUtil

public LoggingUtil(java.util.logging.Logger logger,
                   java.lang.String loggerName)
Creates a new instance of LoggingUtil

Parameters:
logger -
loggerName -
Method Detail

call

public void call()


call

public void call(java.lang.Object msg)


start

public void start()


start

public void start(java.lang.Object msg)


end

public void end()


end

public void end(java.lang.Object msg)


debug

public void debug(java.lang.Object message)


info

public void info(java.lang.Object message)


info

public void info(java.lang.Object message,
                 java.lang.Throwable error)


warning

public void warning(java.lang.Object message)


warning

public void warning(java.lang.Object message,
                    java.lang.Throwable throwable)


error

public void error(java.lang.Object message)


error

public void error(java.lang.Object message,
                  java.lang.Throwable throwable)


isDebugEnabled

public boolean isDebugEnabled()


isInfoEnabled

public boolean isInfoEnabled()


isWarnEnabled

public boolean isWarnEnabled()


isErrorEnabled

public boolean isErrorEnabled()


getName

public java.lang.String getName()


getLogger

public java.util.logging.Logger getLogger()


Copyright © 2005-2011 Petals Link (EBM Websourcing). All Rights Reserved.