org.jfree.util

## Class LogContext

- java.lang.Object
- - org.jfree.util.LogContext

    public class LogContext
    extends java.lang.Object

A log context.

Author:
  Thomas Morgner

### Constructor Summary

Constructors
Constructor and Description
`LogContext(java.lang.String contextPrefix)` Creates a new log context.

### Method Summary

Methods
`void` `debug(java.lang.Object message)` A convenience method for logging a 'debug' message.
`void` `debug(java.lang.Object message, java.lang.Exception e)` A convenience method for logging a 'debug' message.
`boolean` `equals(java.lang.Object o)` Tests this object for equality with an arbitrary object.
`void` `error(java.lang.Object message)` A convenience method for logging an 'error' message.
`void` `error(java.lang.Object message, java.lang.Exception e)` A convenience method for logging an 'error' message.
`int` `hashCode()` Returns a hashcode.
`void` `info(java.lang.Object message)` A convenience method for logging an 'info' message.
`void` `info(java.lang.Object message, java.lang.Exception e)` A convenience method for logging an 'info' message.
`boolean` `isDebugEnabled()` Returns true, if the log level allows debug messages to be printed.
`boolean` `isErrorEnabled()` Returns true, if the log level allows error messages to be printed.
`boolean` `isInfoEnabled()` Returns true, if the log level allows informational messages to be printed.
`boolean` `isWarningEnabled()` Returns true, if the log level allows warning messages to be printed.
`void` `log(int level, java.lang.Object message)` Logs a message to the main log stream.
`void` `log(int level, java.lang.Object message, java.lang.Exception e)` Logs a message to the main log stream.
`void` `warn(java.lang.Object message)` A convenience method for logging a 'warning' message.
`void` `warn(java.lang.Object message, java.lang.Exception e)` A convenience method for logging a 'warning' message.

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### LogContext

    public LogContext(java.lang.String contextPrefix)

Creates a new log context.

Parameters:
  `contextPrefix` - the prefix.

### Method Detail

#### isDebugEnabled

    public boolean isDebugEnabled()

Returns true, if the log level allows debug messages to be printed.

Returns:
  true, if messages with an log level of DEBUG are allowed.

#### isInfoEnabled

    public boolean isInfoEnabled()

Returns true, if the log level allows informational messages to be printed.

Returns:
  true, if messages with an log level of INFO are allowed.

#### isWarningEnabled

    public boolean isWarningEnabled()

Returns true, if the log level allows warning messages to be printed.

Returns:
  true, if messages with an log level of WARN are allowed.

#### isErrorEnabled

    public boolean isErrorEnabled()

Returns true, if the log level allows error messages to be printed.

Returns:
  true, if messages with an log level of ERROR are allowed.

#### debug

    public void debug(java.lang.Object message)

A convenience method for logging a 'debug' message.

Parameters:
  `message` - the message.

#### debug

    public void debug(java.lang.Object message,
             java.lang.Exception e)

A convenience method for logging a 'debug' message.

Parameters:
  `message` - the message.
  `e` - the exception.

#### info

    public void info(java.lang.Object message)

A convenience method for logging an 'info' message.

Parameters:
  `message` - the message.

#### info

    public void info(java.lang.Object message,
            java.lang.Exception e)

A convenience method for logging an 'info' message.

Parameters:
  `message` - the message.
  `e` - the exception.

#### warn

    public void warn(java.lang.Object message)

A convenience method for logging a 'warning' message.

Parameters:
  `message` - the message.

#### warn

    public void warn(java.lang.Object message,
            java.lang.Exception e)

A convenience method for logging a 'warning' message.

Parameters:
  `message` - the message.
  `e` - the exception.

#### error

    public void error(java.lang.Object message)

A convenience method for logging an 'error' message.

Parameters:
  `message` - the message.

#### error

    public void error(java.lang.Object message,
             java.lang.Exception e)

A convenience method for logging an 'error' message.

Parameters:
  `message` - the message.
  `e` - the exception.

#### log

    public void log(int level,
           java.lang.Object message)

Logs a message to the main log stream. All attached log targets will also receive this message. If the given log-level is higher than the given debug-level in the main config file, no logging will be done.

Parameters:
  `level` - log level of the message.
  `message` - text to be logged.

#### log

    public void log(int level,
           java.lang.Object message,
           java.lang.Exception e)

Logs a message to the main log stream. All attached logTargets will also receive this message. If the given log-level is higher than the given debug-level in the main config file, no logging will be done.

The exception's stacktrace will be appended to the log-stream

Parameters:
  `level` - log level of the message.
  `message` - text to be logged.
  `e` - the exception, which should be logged.

#### equals

    public boolean equals(java.lang.Object o)

Tests this object for equality with an arbitrary object.

Overrides:
  `equals` in class `java.lang.Object`
Parameters:
  `o` - the object to test against (`null` permitted).
Returns:
  A boolean.

#### hashCode

    public int hashCode()

Returns a hashcode.

Overrides:
  `hashCode` in class `java.lang.Object`
Returns:
  The hashcode.