fulmine.util.log
Class AsyncLog

java.lang.Object
  extended by fulmine.util.log.AsyncLog
All Implemented Interfaces:
org.apache.commons.logging.Log

public final class AsyncLog
extends Object
implements org.apache.commons.logging.Log

Wraps a Log and executes the logging operations using an ITaskExecutor. This ensures that, regardless of the logging framework and configuration, all internal logging is done asynchronously.

Author:
Ramon Servadei

Constructor Summary
AsyncLog(Class<?> type)
          Create an internal Log identified by the class
AsyncLog(String name)
          Create an internal Log identified by the name
 
Method Summary
 void debug(Object message)
           
 void debug(Object message, Throwable t)
           
 void error(Object message)
           
 void error(Object message, Throwable t)
           
 void fatal(Object message)
           
 void fatal(Object message, Throwable t)
           
 void info(Object message)
           
 void info(Object message, Throwable t)
           
 boolean isDebugEnabled()
           
 boolean isErrorEnabled()
           
 boolean isFatalEnabled()
           
 boolean isInfoEnabled()
           
 boolean isTraceEnabled()
           
 boolean isWarnEnabled()
           
 void trace(Object message)
           
 void trace(Object message, Throwable t)
           
 void warn(Object message)
           
 void warn(Object message, Throwable t)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AsyncLog

public AsyncLog(String name)
Create an internal Log identified by the name

Parameters:
name - the name for the Log

AsyncLog

public AsyncLog(Class<?> type)
Create an internal Log identified by the class

Parameters:
type - the class that will identify the Log
Method Detail

debug

public void debug(Object message,
                  Throwable t)
Specified by:
debug in interface org.apache.commons.logging.Log

debug

public void debug(Object message)
Specified by:
debug in interface org.apache.commons.logging.Log

error

public void error(Object message,
                  Throwable t)
Specified by:
error in interface org.apache.commons.logging.Log

error

public void error(Object message)
Specified by:
error in interface org.apache.commons.logging.Log

fatal

public void fatal(Object message,
                  Throwable t)
Specified by:
fatal in interface org.apache.commons.logging.Log

fatal

public void fatal(Object message)
Specified by:
fatal in interface org.apache.commons.logging.Log

info

public void info(Object message,
                 Throwable t)
Specified by:
info in interface org.apache.commons.logging.Log

info

public void info(Object message)
Specified by:
info in interface org.apache.commons.logging.Log

isDebugEnabled

public boolean isDebugEnabled()
Specified by:
isDebugEnabled in interface org.apache.commons.logging.Log

isErrorEnabled

public boolean isErrorEnabled()
Specified by:
isErrorEnabled in interface org.apache.commons.logging.Log

isFatalEnabled

public boolean isFatalEnabled()
Specified by:
isFatalEnabled in interface org.apache.commons.logging.Log

isInfoEnabled

public boolean isInfoEnabled()
Specified by:
isInfoEnabled in interface org.apache.commons.logging.Log

isTraceEnabled

public boolean isTraceEnabled()
Specified by:
isTraceEnabled in interface org.apache.commons.logging.Log

isWarnEnabled

public boolean isWarnEnabled()
Specified by:
isWarnEnabled in interface org.apache.commons.logging.Log

trace

public void trace(Object message,
                  Throwable t)
Specified by:
trace in interface org.apache.commons.logging.Log

trace

public void trace(Object message)
Specified by:
trace in interface org.apache.commons.logging.Log

warn

public void warn(Object message,
                 Throwable t)
Specified by:
warn in interface org.apache.commons.logging.Log

warn

public void warn(Object message)
Specified by:
warn in interface org.apache.commons.logging.Log


Copyright © 2007-2009. All Rights Reserved.