org.apache.maven.shared.invoker
Interface InvokerLogger

All Known Implementing Classes:
PrintStreamLogger

public interface InvokerLogger

A logger used by Invoker instances to output diagnostic messages.

Version:
$Id: InvokerLogger.java 662043 2008-05-31 16:27:02Z bentmann $
Author:
Jason van Zyl
See Also:
Invoker.setLogger(InvokerLogger)

Field Summary
static int DEBUG
          The threshold for debug output.
static int ERROR
          The threshold for error output.
static int FATAL
          The threshold for fatal error output.
static int INFO
          The threshold for info output.
static int WARN
          The threshold for warn output.
 
Method Summary
 void debug(java.lang.String message)
          Logs the specified debug message.
 void debug(java.lang.String message, java.lang.Throwable throwable)
          Logs the specified debug message and the accompanying exception.
 void error(java.lang.String message)
          Logs the specified error message.
 void error(java.lang.String message, java.lang.Throwable throwable)
          Logs the specified error message and the accompanying exception.
 void fatalError(java.lang.String message)
          Logs the specified fatal error message.
 void fatalError(java.lang.String message, java.lang.Throwable throwable)
          Logs the specified fatal error message and the accompanying exception.
 int getThreshold()
          Gets the logger's threshold.
 void info(java.lang.String message)
          Logs the specified info message.
 void info(java.lang.String message, java.lang.Throwable throwable)
          Logs the specified info message and the accompanying exception.
 boolean isDebugEnabled()
          Tests whether debug output is enabled for this logger.
 boolean isErrorEnabled()
          Tests whether error output is enabled for this logger.
 boolean isFatalErrorEnabled()
          Tests whether fatal error output is enabled for this logger.
 boolean isInfoEnabled()
          Tests whether info output is enabled for this logger.
 boolean isWarnEnabled()
          Tests whether warn output is enabled for this logger.
 void setThreshold(int threshold)
          Sets the logger's threshold.
 void warn(java.lang.String message)
          Logs the specified warning message.
 void warn(java.lang.String message, java.lang.Throwable throwable)
          Logs the specified warning message and the accompanying exception.
 

Field Detail

DEBUG

public static final int DEBUG
The threshold for debug output.

See Also:
Constant Field Values

INFO

public static final int INFO
The threshold for info output.

See Also:
Constant Field Values

WARN

public static final int WARN
The threshold for warn output.

See Also:
Constant Field Values

ERROR

public static final int ERROR
The threshold for error output.

See Also:
Constant Field Values

FATAL

public static final int FATAL
The threshold for fatal error output.

See Also:
Constant Field Values
Method Detail

debug

public void debug(java.lang.String message)
Logs the specified debug message.

Parameters:
message - The message to log, may be null.

debug

public void debug(java.lang.String message,
                  java.lang.Throwable throwable)
Logs the specified debug message and the accompanying exception.

Parameters:
message - The message to log, may be null.
throwable - The exception to log, may be null.

isDebugEnabled

public boolean isDebugEnabled()
Tests whether debug output is enabled for this logger.

Returns:
true if messages with priority "debug" or above are logged, false otherwise.

info

public void info(java.lang.String message)
Logs the specified info message.

Parameters:
message - The message to log, may be null.

info

public void info(java.lang.String message,
                 java.lang.Throwable throwable)
Logs the specified info message and the accompanying exception.

Parameters:
message - The message to log, may be null.
throwable - The exception to log, may be null.

isInfoEnabled

public boolean isInfoEnabled()
Tests whether info output is enabled for this logger.

Returns:
true if messages with priority "info" or above are logged, false otherwise.

warn

public void warn(java.lang.String message)
Logs the specified warning message.

Parameters:
message - The message to log, may be null.

warn

public void warn(java.lang.String message,
                 java.lang.Throwable throwable)
Logs the specified warning message and the accompanying exception.

Parameters:
message - The message to log, may be null.
throwable - The exception to log, may be null.

isWarnEnabled

public boolean isWarnEnabled()
Tests whether warn output is enabled for this logger.

Returns:
true if messages with priority "warn" or above are logged, false otherwise.

error

public void error(java.lang.String message)
Logs the specified error message.

Parameters:
message - The message to log, may be null.

error

public void error(java.lang.String message,
                  java.lang.Throwable throwable)
Logs the specified error message and the accompanying exception.

Parameters:
message - The message to log, may be null.
throwable - The exception to log, may be null.

isErrorEnabled

public boolean isErrorEnabled()
Tests whether error output is enabled for this logger.

Returns:
true if messages with priority "error" or above are logged, false otherwise.

fatalError

public void fatalError(java.lang.String message)
Logs the specified fatal error message.

Parameters:
message - The message to log, may be null.

fatalError

public void fatalError(java.lang.String message,
                       java.lang.Throwable throwable)
Logs the specified fatal error message and the accompanying exception.

Parameters:
message - The message to log, may be null.
throwable - The exception to log, may be null.

isFatalErrorEnabled

public boolean isFatalErrorEnabled()
Tests whether fatal error output is enabled for this logger.

Returns:
true if messages with priority "fatal" or above are logged, false otherwise.

setThreshold

public void setThreshold(int threshold)
Sets the logger's threshold.

Parameters:
threshold - The logger's threshold, must be one of DEBUG, INFO, WARN, ERROR and FATAL.

getThreshold

public int getThreshold()
Gets the logger's threshold.

Returns:
The logger's threshold, one of DEBUG, INFO, WARN, ERROR and FATAL.


Copyright © 2002-2009 The Apache Software Foundation. All Rights Reserved.