org.apache.avalon.framework.logger
Class ConsoleLogger
java.lang.Object
org.apache.avalon.framework.logger.ConsoleLogger
- Logger
public final class ConsoleLogger
extends java.lang.Object
implements Logger
Logger sending everything to the standard output streams.
This is mainly for the cases when you have a utility that
does not have a logger to supply.
CVS $Revision: 1.14 $ $Date: 2004/02/11 14:34:26 $
ConsoleLogger() - Creates a new ConsoleLogger with the priority set to DEBUG.
|
ConsoleLogger(int logLevel) - Creates a new ConsoleLogger.
|
void | debug(String message) - Logs a debugging message.
|
void | debug(String message, Throwable throwable) - Logs a debugging message and an exception.
|
void | error(String message) - Logs an error message.
|
void | error(String message, Throwable throwable) - Logs an error message and an exception.
|
void | fatalError(String message) - Logs a fatal error message.
|
void | fatalError(String message, Throwable throwable) - Logs a fatal error message and an exception.
|
Logger | getChildLogger(String name) - Just returns this logger (
ConsoleLogger is not hierarchical).
|
void | info(String message) - Logs an informational message.
|
void | info(String message, Throwable throwable) - Logs an informational message and an exception.
|
boolean | isDebugEnabled() - Returns
true if debug-level logging is enabled, false otherwise.
|
boolean | isErrorEnabled() - Returns
true if error-level logging is enabled, false otherwise.
|
boolean | isFatalErrorEnabled() - Returns
true if fatal-level logging is enabled, false otherwise.
|
boolean | isInfoEnabled() - Returns
true if info-level logging is enabled, false otherwise.
|
boolean | isWarnEnabled() - Returns
true if warn-level logging is enabled, false otherwise.
|
void | warn(String message) - Logs a warning message.
|
void | warn(String message, Throwable throwable) - Logs a warning message and an exception.
|
LEVEL_DEBUG
public static final int LEVEL_DEBUG
Typecode for debugging messages.
LEVEL_DISABLED
public static final int LEVEL_DISABLED
Typecode for disabled log levels.
LEVEL_ERROR
public static final int LEVEL_ERROR
Typecode for error messages.
LEVEL_FATAL
public static final int LEVEL_FATAL
Typecode for fatal error messages.
LEVEL_INFO
public static final int LEVEL_INFO
Typecode for informational messages.
LEVEL_WARN
public static final int LEVEL_WARN
Typecode for warning messages.
ConsoleLogger
public ConsoleLogger()
Creates a new ConsoleLogger with the priority set to DEBUG.
ConsoleLogger
public ConsoleLogger(int logLevel)
Creates a new ConsoleLogger.
logLevel
- log level typecode
debug
public void debug(String message)
Logs a debugging message.
debug
public void debug(String message,
Throwable throwable)
Logs a debugging message and an exception.
message
- a String
valuethrowable
- a Throwable
value
error
public void error(String message)
Logs an error message.
error
public void error(String message,
Throwable throwable)
Logs an error message and an exception.
message
- a String
valuethrowable
- a Throwable
value
fatalError
public void fatalError(String message)
Logs a fatal error message.
fatalError
public void fatalError(String message,
Throwable throwable)
Logs a fatal error message and an exception.
message
- a String
valuethrowable
- a Throwable
value
getChildLogger
public Logger getChildLogger(String name)
Just returns this logger (ConsoleLogger
is not hierarchical).
info
public void info(String message)
Logs an informational message.
info
public void info(String message,
Throwable throwable)
Logs an informational message and an exception.
message
- a String
valuethrowable
- a Throwable
value
isDebugEnabled
public boolean isDebugEnabled()
Returns true
if debug-level logging is enabled, false otherwise.
true
if debug-level logging
isErrorEnabled
public boolean isErrorEnabled()
Returns true
if error-level logging is enabled, false otherwise.
true
if error-level logging is enabled
isFatalErrorEnabled
public boolean isFatalErrorEnabled()
Returns true
if fatal-level logging is enabled, false otherwise.
true
if fatal-level logging is enabled
isInfoEnabled
public boolean isInfoEnabled()
Returns true
if info-level logging is enabled, false otherwise.
true
if info-level logging is enabled
isWarnEnabled
public boolean isWarnEnabled()
Returns true
if warn-level logging is enabled, false otherwise.
true
if warn-level logging is enabled
warn
public void warn(String message)
Logs a warning message.
warn
public void warn(String message,
Throwable throwable)
Logs a warning message and an exception.
message
- a String
valuethrowable
- a Throwable
value