org.apache.commons.logging.impl

Class Log4JCategoryLog

public final class Log4JCategoryLog extends Object implements Log

Deprecated: Use {@link Log4JLogger} instead.

Implementation of {@link Log} that maps directly to a Log4J Category. Initial configuration of the corresponding Category instances should be done in the usual manner, as outlined in the Log4J documentation.

Version: $Id: Log4JCategoryLog.java,v 1.15 2004/02/28 21:46:45 craigmcc Exp $

Author: Scott Sanders Rod Waldhoff Robert Burrell Donkin

Field Summary
Categorycategory
Log to this category
static StringFQCN
The fully qualified name of the Log4JCategoryLog class.
Constructor Summary
Log4JCategoryLog()
Log4JCategoryLog(String name)
Base constructor.
Log4JCategoryLog(Category category)
For use with a log4j factory.
Method Summary
voiddebug(Object message)
Log a message to the Log4j Category with DEBUG priority.
voiddebug(Object message, Throwable t)
Log an error to the Log4j Category with DEBUG priority.
voiderror(Object message)
Log a message to the Log4j Category with ERROR priority.
voiderror(Object message, Throwable t)
Log an error to the Log4j Category with ERROR priority.
voidfatal(Object message)
Log a message to the Log4j Category with FATAL priority.
voidfatal(Object message, Throwable t)
Log an error to the Log4j Category with FATAL priority.
CategorygetCategory()
Return the native Category instance we are using.
voidinfo(Object message)
Log a message to the Log4j Category with INFO priority.
voidinfo(Object message, Throwable t)
Log an error to the Log4j Category with INFO priority.
booleanisDebugEnabled()
Check whether the Log4j Category used is enabled for DEBUG priority.
booleanisErrorEnabled()
Check whether the Log4j Category used is enabled for ERROR priority.
booleanisFatalEnabled()
Check whether the Log4j Category used is enabled for FATAL priority.
booleanisInfoEnabled()
Check whether the Log4j Category used is enabled for INFO priority.
booleanisTraceEnabled()
Check whether the Log4j Category used is enabled for TRACE priority.
booleanisWarnEnabled()
Check whether the Log4j Category used is enabled for WARN priority.
voidtrace(Object message)
Log a message to the Log4j Category with TRACE priority.
voidtrace(Object message, Throwable t)
Log an error to the Log4j Category with TRACE priority.
voidwarn(Object message)
Log a message to the Log4j Category with WARN priority.
voidwarn(Object message, Throwable t)
Log an error to the Log4j Category with WARN priority.

Field Detail

category

private Category category
Log to this category

FQCN

private static final String FQCN
The fully qualified name of the Log4JCategoryLog class.

Constructor Detail

Log4JCategoryLog

public Log4JCategoryLog()

Log4JCategoryLog

public Log4JCategoryLog(String name)
Base constructor.

Log4JCategoryLog

public Log4JCategoryLog(Category category)
For use with a log4j factory.

Method Detail

debug

public void debug(Object message)
Log a message to the Log4j Category with DEBUG priority.

debug

public void debug(Object message, Throwable t)
Log an error to the Log4j Category with DEBUG priority.

error

public void error(Object message)
Log a message to the Log4j Category with ERROR priority.

error

public void error(Object message, Throwable t)
Log an error to the Log4j Category with ERROR priority.

fatal

public void fatal(Object message)
Log a message to the Log4j Category with FATAL priority.

fatal

public void fatal(Object message, Throwable t)
Log an error to the Log4j Category with FATAL priority.

getCategory

public Category getCategory()
Return the native Category instance we are using.

info

public void info(Object message)
Log a message to the Log4j Category with INFO priority.

info

public void info(Object message, Throwable t)
Log an error to the Log4j Category with INFO priority.

isDebugEnabled

public boolean isDebugEnabled()
Check whether the Log4j Category used is enabled for DEBUG priority.

isErrorEnabled

public boolean isErrorEnabled()
Check whether the Log4j Category used is enabled for ERROR priority.

isFatalEnabled

public boolean isFatalEnabled()
Check whether the Log4j Category used is enabled for FATAL priority.

isInfoEnabled

public boolean isInfoEnabled()
Check whether the Log4j Category used is enabled for INFO priority.

isTraceEnabled

public boolean isTraceEnabled()
Check whether the Log4j Category used is enabled for TRACE priority. For Log4J, this returns the value of isDebugEnabled()

isWarnEnabled

public boolean isWarnEnabled()
Check whether the Log4j Category used is enabled for WARN priority.

trace

public void trace(Object message)
Log a message to the Log4j Category with TRACE priority. Currently logs to DEBUG level in Log4J.

trace

public void trace(Object message, Throwable t)
Log an error to the Log4j Category with TRACE priority. Currently logs to DEBUG level in Log4J.

warn

public void warn(Object message)
Log a message to the Log4j Category with WARN priority.

warn

public void warn(Object message, Throwable t)
Log an error to the Log4j Category with WARN priority.
Copyright 2002-2004 The Apache Software Foundation.