public class

LogKitLogger

extends Object
implements Serializable Log
java.lang.Object
   ↳ org.apache.commons.logging.impl.LogKitLogger

Class Overview

Implementation of org.apache.commons.logging.Log that wraps the avalon-logkit logging system. Configuration of LogKit is left to the user.

LogKit accepts only String messages. Therefore, this implementation converts object messages into strings by called their toString() method before logging them.

Summary

Fields
protected Logger logger Logging goes to this LogKit logger
protected String name Name of this logger
Public Constructors
LogKitLogger(String name)
Construct LogKitLogger which wraps the LogKit logger with given name.
Public Methods
void debug(Object message, Throwable t)
Logs a message with org.apache.log.Priority.DEBUG.
void debug(Object message)
Logs a message with org.apache.log.Priority.DEBUG.
void error(Object message)
Logs a message with org.apache.log.Priority.ERROR.
void error(Object message, Throwable t)
Logs a message with org.apache.log.Priority.ERROR.
void fatal(Object message)
Logs a message with org.apache.log.Priority.FATAL_ERROR.
void fatal(Object message, Throwable t)
Logs a message with org.apache.log.Priority.FATAL_ERROR.
Logger getLogger()

Return the underlying Logger we are using.

void info(Object message)
Logs a message with org.apache.log.Priority.INFO.
void info(Object message, Throwable t)
Logs a message with org.apache.log.Priority.INFO.
boolean isDebugEnabled()
Checks whether the LogKit logger will log messages of priority DEBUG.
boolean isErrorEnabled()
Checks whether the LogKit logger will log messages of priority ERROR.
boolean isFatalEnabled()
Checks whether the LogKit logger will log messages of priority FATAL_ERROR.
boolean isInfoEnabled()
Checks whether the LogKit logger will log messages of priority INFO.
boolean isTraceEnabled()
Checks whether the LogKit logger will log messages of priority DEBUG.
boolean isWarnEnabled()
Checks whether the LogKit logger will log messages of priority WARN.
void trace(Object message)
Logs a message with org.apache.log.Priority.DEBUG.
void trace(Object message, Throwable t)
Logs a message with org.apache.log.Priority.DEBUG.
void warn(Object message, Throwable t)
Logs a message with org.apache.log.Priority.WARN.
void warn(Object message)
Logs a message with org.apache.log.Priority.WARN.
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.apache.commons.logging.Log

Fields

protected Logger logger

Logging goes to this LogKit logger

protected String name

Name of this logger

Public Constructors

public LogKitLogger (String name)

Construct LogKitLogger which wraps the LogKit logger with given name.

Parameters
name log name

Public Methods

public void debug (Object message, Throwable t)

Logs a message with org.apache.log.Priority.DEBUG.

Parameters
message to log
t log this cause

public void debug (Object message)

Logs a message with org.apache.log.Priority.DEBUG.

Parameters
message to log
See Also

public void error (Object message)

Logs a message with org.apache.log.Priority.ERROR.

Parameters
message to log
See Also

public void error (Object message, Throwable t)

Logs a message with org.apache.log.Priority.ERROR.

Parameters
message to log
t log this cause

public void fatal (Object message)

Logs a message with org.apache.log.Priority.FATAL_ERROR.

Parameters
message to log
See Also

public void fatal (Object message, Throwable t)

Logs a message with org.apache.log.Priority.FATAL_ERROR.

Parameters
message to log
t log this cause

public Logger getLogger ()

Return the underlying Logger we are using.

public void info (Object message)

Logs a message with org.apache.log.Priority.INFO.

Parameters
message to log
See Also

public void info (Object message, Throwable t)

Logs a message with org.apache.log.Priority.INFO.

Parameters
message to log
t log this cause

public boolean isDebugEnabled ()

Checks whether the LogKit logger will log messages of priority DEBUG.

Returns
  • true if debug is enabled in the underlying logger.

public boolean isErrorEnabled ()

Checks whether the LogKit logger will log messages of priority ERROR.

Returns
  • true if error is enabled in the underlying logger.

public boolean isFatalEnabled ()

Checks whether the LogKit logger will log messages of priority FATAL_ERROR.

Returns
  • true if fatal is enabled in the underlying logger.

public boolean isInfoEnabled ()

Checks whether the LogKit logger will log messages of priority INFO.

Returns
  • true if info is enabled in the underlying logger.

public boolean isTraceEnabled ()

Checks whether the LogKit logger will log messages of priority DEBUG.

Returns
  • true if trace is enabled in the underlying logger.

public boolean isWarnEnabled ()

Checks whether the LogKit logger will log messages of priority WARN.

Returns
  • true if warn is enabled in the underlying logger.

public void trace (Object message)

Logs a message with org.apache.log.Priority.DEBUG.

Parameters
message to log
See Also

public void trace (Object message, Throwable t)

Logs a message with org.apache.log.Priority.DEBUG.

Parameters
message to log
t log this cause

public void warn (Object message, Throwable t)

Logs a message with org.apache.log.Priority.WARN.

Parameters
message to log
t log this cause

public void warn (Object message)

Logs a message with org.apache.log.Priority.WARN.

Parameters
message to log
See Also