"Fossies" - the Fresh Open Source Software archive

Member "urlrewrite-3.2.0-src/api/org/tuckey/web/filters/urlrewrite/utils/Log.html" (4 Dec 2008, 27377 Bytes) of archive /linux/www/urlrewritefilter-3.2.0-src.zip:


Caution: In this restricted "Fossies" environment the current HTML page may not be correctly presentated and may have some non-functional links. Alternatively you can here view or download the uninterpreted source code. That can be also achieved for any archive member file by clicking within an archive contents listing on the first character of the file(path) respectively on the according byte size field.



org.tuckey.web.filters.urlrewrite.utils
Class Log

java.lang.Object
  extended by org.tuckey.web.filters.urlrewrite.utils.Log

public class Log
extends java.lang.Object

Log copies the style of commons logging. The only reason this exists is that many problems were had with Log4j and commons-logging interfering with peoples installed configuration. It is very easy to change this to log4j, slf4j or commons-logging by settting log level to "log4j", "slf4j" or "commons" Note, this will fall back to system.log if not initialised with a context.

Version:
$Revision: 42 $ $Date: 2006-10-29 09:43:56 +1300 (Sun, 29 Oct 2006) $
Author:
Paul Tuckey

Method Summary
 void debug(java.lang.Object o)
           
 void debug(java.lang.Object o, java.lang.Throwable throwable)
           
 void debug(java.lang.Throwable throwable)
           
 void error(java.lang.Object o)
           
 void error(java.lang.Object o, java.lang.Throwable throwable)
           
 void error(java.lang.Throwable throwable)
           
 void fatal(java.lang.Object o)
           
 void fatal(java.lang.Object o, java.lang.Throwable throwable)
           
 void fatal(java.lang.Throwable throwable)
           
static Log getLog(java.lang.Class aClass)
          Will get an instance of log for a given class.
 void info(java.lang.Object o)
           
 void info(java.lang.Object o, java.lang.Throwable throwable)
           
 void info(java.lang.Throwable throwable)
           
 boolean isDebugEnabled()
           
 boolean isErrorEnabled()
           
 boolean isFatalEnabled()
           
 boolean isInfoEnabled()
           
 boolean isTraceEnabled()
           
 boolean isUsingCommonsLogging()
           
 boolean isWarnEnabled()
           
static void resetAll()
          Resets log to default state.
static void setConfiguration(javax.servlet.FilterConfig filterConfig)
          Will setup Log based on the filter config.
static void setLevel(java.lang.String level)
          Set the logging level (options are TRACE, DEBUG, INFO, WARN, ERROR, FATAL).
 void trace(java.lang.Object o)
           
 void trace(java.lang.Object o, java.lang.Throwable throwable)
           
 void trace(java.lang.Throwable throwable)
           
 void warn(java.lang.Object o)
           
 void warn(java.lang.Object o, java.lang.Throwable throwable)
           
 void warn(java.lang.Throwable throwable)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isUsingCommonsLogging

public boolean isUsingCommonsLogging()

isTraceEnabled

public boolean isTraceEnabled()

isDebugEnabled

public boolean isDebugEnabled()

isInfoEnabled

public boolean isInfoEnabled()

isWarnEnabled

public boolean isWarnEnabled()

isErrorEnabled

public boolean isErrorEnabled()

isFatalEnabled

public boolean isFatalEnabled()

trace

public void trace(java.lang.Object o)

trace

public void trace(java.lang.Object o,
                  java.lang.Throwable throwable)

trace

public void trace(java.lang.Throwable throwable)

debug

public void debug(java.lang.Object o)

debug

public void debug(java.lang.Object o,
                  java.lang.Throwable throwable)

debug

public void debug(java.lang.Throwable throwable)

info

public void info(java.lang.Object o)

info

public void info(java.lang.Object o,
                 java.lang.Throwable throwable)

info

public void info(java.lang.Throwable throwable)

warn

public void warn(java.lang.Object o)

warn

public void warn(java.lang.Object o,
                 java.lang.Throwable throwable)

warn

public void warn(java.lang.Throwable throwable)

error

public void error(java.lang.Object o)

error

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

error

public void error(java.lang.Throwable throwable)

fatal

public void fatal(java.lang.Object o)

fatal

public void fatal(java.lang.Object o,
                  java.lang.Throwable throwable)

fatal

public void fatal(java.lang.Throwable throwable)

getLog

public static Log getLog(java.lang.Class aClass)
Will get an instance of log for a given class.

Parameters:
aClass - to log for
Returns:
the log instance

setLevel

public static void setLevel(java.lang.String level)
Set the logging level (options are TRACE, DEBUG, INFO, WARN, ERROR, FATAL).

Parameters:
level - the level to log with

resetAll

public static void resetAll()
Resets log to default state.


setConfiguration

public static void setConfiguration(javax.servlet.FilterConfig filterConfig)
Will setup Log based on the filter config. Uses init paramater "logLevel" to get the log level. Defaults to "INFO".

Parameters:
filterConfig - the filter config to use