org.apache.commons.configuration
Class Logging

java.lang.Object
  extended by org.apache.commons.logging.impl.Log4JLogger
      extended by org.apache.commons.configuration.Logging
All Implemented Interfaces:
Serializable, org.apache.commons.logging.Log

public class Logging
extends org.apache.commons.logging.impl.Log4JLogger

Configures logging for tests. When running with Maven do -Dmaven.surefire.debug="LogLevel=level" to set the Log Level to the desired value.

See Also:
Serialized Form

Constructor Summary
Logging()
           
Logging(org.apache.log4j.Logger logger)
          For use with a log4j factory.
Logging(String name)
          Base constructor.
 
Method Summary
 void debug(Object message)
          Logs a message with org.apache.log4j.Priority.DEBUG.
 void debug(Object message, Throwable t)
          Logs a message with org.apache.log4j.Priority.DEBUG.
 void error(Object message)
          Logs a message with org.apache.log4j.Priority.ERROR.
 void error(Object message, Throwable t)
          Logs a message with org.apache.log4j.Priority.ERROR.
 void fatal(Object message)
          Logs a message with org.apache.log4j.Priority.FATAL.
 void fatal(Object message, Throwable t)
          Logs a message with org.apache.log4j.Priority.FATAL.
 void info(Object message)
          Logs a message with org.apache.log4j.Priority.INFO.
 void info(Object message, Throwable t)
          Logs a message with org.apache.log4j.Priority.INFO.
 void trace(Object message)
          Logs a message with org.apache.log4j.Priority.TRACE.
 void trace(Object message, Throwable t)
          Logs a message with org.apache.log4j.Priority.TRACE.
 void warn(Object message)
          Logs a message with org.apache.log4j.Priority.WARN.
 void warn(Object message, Throwable t)
          Logs a message with org.apache.log4j.Priority.WARN.
 
Methods inherited from class org.apache.commons.logging.impl.Log4JLogger
getLogger, isDebugEnabled, isErrorEnabled, isFatalEnabled, isInfoEnabled, isTraceEnabled, isWarnEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Logging

public Logging()

Logging

public Logging(String name)
Base constructor.


Logging

public Logging(org.apache.log4j.Logger logger)
For use with a log4j factory.

Method Detail

trace

public void trace(Object message)
Logs a message with org.apache.log4j.Priority.TRACE. When using a log4j version that does not support the TRACE level, the message will be logged at the DEBUG level.

Specified by:
trace in interface org.apache.commons.logging.Log
Overrides:
trace in class org.apache.commons.logging.impl.Log4JLogger
Parameters:
message - to log
See Also:
Log.trace(Object)

trace

public void trace(Object message,
                  Throwable t)
Logs a message with org.apache.log4j.Priority.TRACE. When using a log4j version that does not support the TRACE level, the message will be logged at the DEBUG level.

Specified by:
trace in interface org.apache.commons.logging.Log
Overrides:
trace in class org.apache.commons.logging.impl.Log4JLogger
Parameters:
message - to log
t - log this cause
See Also:
Log.trace(Object, Throwable)

debug

public void debug(Object message)
Logs a message with org.apache.log4j.Priority.DEBUG.

Specified by:
debug in interface org.apache.commons.logging.Log
Overrides:
debug in class org.apache.commons.logging.impl.Log4JLogger
Parameters:
message - to log
See Also:
Log.debug(Object)

debug

public void debug(Object message,
                  Throwable t)
Logs a message with org.apache.log4j.Priority.DEBUG.

Specified by:
debug in interface org.apache.commons.logging.Log
Overrides:
debug in class org.apache.commons.logging.impl.Log4JLogger
Parameters:
message - to log
t - log this cause
See Also:
Log.debug(Object, Throwable)

info

public void info(Object message)
Logs a message with org.apache.log4j.Priority.INFO.

Specified by:
info in interface org.apache.commons.logging.Log
Overrides:
info in class org.apache.commons.logging.impl.Log4JLogger
Parameters:
message - to log
See Also:
Log.info(Object)

info

public void info(Object message,
                 Throwable t)
Logs a message with org.apache.log4j.Priority.INFO.

Specified by:
info in interface org.apache.commons.logging.Log
Overrides:
info in class org.apache.commons.logging.impl.Log4JLogger
Parameters:
message - to log
t - log this cause
See Also:
Log.info(Object, Throwable)

warn

public void warn(Object message)
Logs a message with org.apache.log4j.Priority.WARN.

Specified by:
warn in interface org.apache.commons.logging.Log
Overrides:
warn in class org.apache.commons.logging.impl.Log4JLogger
Parameters:
message - to log
See Also:
Log.warn(Object)

warn

public void warn(Object message,
                 Throwable t)
Logs a message with org.apache.log4j.Priority.WARN.

Specified by:
warn in interface org.apache.commons.logging.Log
Overrides:
warn in class org.apache.commons.logging.impl.Log4JLogger
Parameters:
message - to log
t - log this cause
See Also:
Log.warn(Object, Throwable)

error

public void error(Object message)
Logs a message with org.apache.log4j.Priority.ERROR.

Specified by:
error in interface org.apache.commons.logging.Log
Overrides:
error in class org.apache.commons.logging.impl.Log4JLogger
Parameters:
message - to log
See Also:
Log.error(Object)

error

public void error(Object message,
                  Throwable t)
Logs a message with org.apache.log4j.Priority.ERROR.

Specified by:
error in interface org.apache.commons.logging.Log
Overrides:
error in class org.apache.commons.logging.impl.Log4JLogger
Parameters:
message - to log
t - log this cause
See Also:
Log.error(Object, Throwable)

fatal

public void fatal(Object message)
Logs a message with org.apache.log4j.Priority.FATAL.

Specified by:
fatal in interface org.apache.commons.logging.Log
Overrides:
fatal in class org.apache.commons.logging.impl.Log4JLogger
Parameters:
message - to log
See Also:
Log.fatal(Object)

fatal

public void fatal(Object message,
                  Throwable t)
Logs a message with org.apache.log4j.Priority.FATAL.

Specified by:
fatal in interface org.apache.commons.logging.Log
Overrides:
fatal in class org.apache.commons.logging.impl.Log4JLogger
Parameters:
message - to log
t - log this cause
See Also:
Log.fatal(Object, Throwable)


Copyright © 2001-2012 The Apache Software Foundation. All Rights Reserved.