net.sourceforge.chaperon.ant
Class AntLog

java.lang.Object
  extended by net.sourceforge.chaperon.ant.AntLog
All Implemented Interfaces:
org.apache.commons.logging.Log

public final class AntLog
extends java.lang.Object
implements org.apache.commons.logging.Log

The Ant wrapper class for Logger.

Version:
CVS $Id: AntLog.java,v 1.3 2004/01/09 10:48:06 benedikta Exp $
Author:
Stephan Michels

Constructor Summary
AntLog(org.apache.tools.ant.Project project)
          Create a logger that delegates to specified logger.
AntLog(org.apache.tools.ant.Project project, int antMsgLevel)
          Create a logger that delegates to specified logger.
 
Method Summary
 void debug(java.lang.Object message)
           Log a message with debug log level.
 void debug(java.lang.Object message, java.lang.Throwable t)
           Log an error with debug log level.
 void error(java.lang.Object message)
           Log a message with error log level.
 void error(java.lang.Object message, java.lang.Throwable t)
           Log an error with error log level.
 void fatal(java.lang.Object message)
           Log a message with fatal log level.
 void fatal(java.lang.Object message, java.lang.Throwable t)
           Log an error with fatal log level.
 void info(java.lang.Object message)
           Log a message with info log level.
 void info(java.lang.Object message, java.lang.Throwable t)
           Log an error with info log level.
 boolean isDebugEnabled()
           Is debug logging currently enabled?
 boolean isErrorEnabled()
           Is error logging currently enabled?
 boolean isFatalEnabled()
           Is fatal logging currently enabled?
 boolean isInfoEnabled()
           Is info logging currently enabled?
 boolean isTraceEnabled()
           Is trace logging currently enabled?
 boolean isWarnEnabled()
           Is warning logging currently enabled?
 void trace(java.lang.Object message)
           Log a message with trace log level.
 void trace(java.lang.Object message, java.lang.Throwable t)
           Log an error with trace log level.
 void warn(java.lang.Object message)
           Log a message with warn log level.
 void warn(java.lang.Object message, java.lang.Throwable t)
           Log an error with warn log level.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AntLog

public AntLog(org.apache.tools.ant.Project project)
Create a logger that delegates to specified logger.

Parameters:
project - the Ant logger to delegate to

AntLog

public AntLog(org.apache.tools.ant.Project project,
              int antMsgLevel)
Create a logger that delegates to specified logger.

Parameters:
project - the Ant logger to delegate to
antMsgLevel - the massage level from ant
Method Detail

trace

public void trace(java.lang.Object message)

Log a message with trace log level.

Specified by:
trace in interface org.apache.commons.logging.Log
Parameters:
message - log this message

trace

public void trace(java.lang.Object message,
                  java.lang.Throwable t)

Log an error with trace log level.

Specified by:
trace in interface org.apache.commons.logging.Log
Parameters:
message - log this message
t - log this cause

isTraceEnabled

public boolean isTraceEnabled()

Is trace logging currently enabled?

Call this method to prevent having to perform expensive operations (for example, String concatination) when the log level is more than trace.

Specified by:
isTraceEnabled in interface org.apache.commons.logging.Log

debug

public void debug(java.lang.Object message)

Log a message with debug log level.

Specified by:
debug in interface org.apache.commons.logging.Log
Parameters:
message - log this message

debug

public void debug(java.lang.Object message,
                  java.lang.Throwable t)

Log an error with debug log level.

Specified by:
debug in interface org.apache.commons.logging.Log
Parameters:
message - log this message
t - log this cause

isDebugEnabled

public boolean isDebugEnabled()

Is debug logging currently enabled?

Call this method to prevent having to perform expensive operations (for example, String concatination) when the log level is more than debug.

Specified by:
isDebugEnabled in interface org.apache.commons.logging.Log

info

public void info(java.lang.Object message)

Log a message with info log level.

Specified by:
info in interface org.apache.commons.logging.Log
Parameters:
message - log this message

info

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

Log an error with info log level.

Specified by:
info in interface org.apache.commons.logging.Log
Parameters:
message - log this message
t - log this cause

isInfoEnabled

public boolean isInfoEnabled()

Is info logging currently enabled?

Call this method to prevent having to perform expensive operations (for example, String concatination) when the log level is more than info.

Specified by:
isInfoEnabled in interface org.apache.commons.logging.Log

warn

public void warn(java.lang.Object message)

Log a message with warn log level.

Specified by:
warn in interface org.apache.commons.logging.Log
Parameters:
message - log this message

warn

public void warn(java.lang.Object message,
                 java.lang.Throwable t)

Log an error with warn log level.

Specified by:
warn in interface org.apache.commons.logging.Log
Parameters:
message - log this message
t - log this cause

isWarnEnabled

public boolean isWarnEnabled()

Is warning logging currently enabled?

Call this method to prevent having to perform expensive operations (for example, String concatination) when the log level is more than warning.

Specified by:
isWarnEnabled in interface org.apache.commons.logging.Log

error

public void error(java.lang.Object message)

Log a message with error log level.

Specified by:
error in interface org.apache.commons.logging.Log
Parameters:
message - log this message

error

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

Log an error with error log level.

Specified by:
error in interface org.apache.commons.logging.Log
Parameters:
message - log this message
t - log this cause

isErrorEnabled

public boolean isErrorEnabled()

Is error logging currently enabled?

Call this method to prevent having to perform expensive operations (for example, String concatination) when the log level is more than error.

Specified by:
isErrorEnabled in interface org.apache.commons.logging.Log

fatal

public void fatal(java.lang.Object message)

Log a message with fatal log level.

Specified by:
fatal in interface org.apache.commons.logging.Log
Parameters:
message - log this message

fatal

public void fatal(java.lang.Object message,
                  java.lang.Throwable t)

Log an error with fatal log level.

Specified by:
fatal in interface org.apache.commons.logging.Log
Parameters:
message - log this message
t - log this cause

isFatalEnabled

public boolean isFatalEnabled()

Is fatal logging currently enabled?

Call this method to prevent having to perform expensive operations (for example, String concatination) when the log level is more than fatal.

Specified by:
isFatalEnabled in interface org.apache.commons.logging.Log


Copyright ? 2003 Chaperon project. All Rights Reserved.