OpenNMS API 1.2.9

## org.opennms.web.log
Class Log4JLogger

    java.lang.Object
      org.opennms.web.log.Log4JLogger

All Implemented Interfaces:
  org.apache.catalina.Logger

public class Log4JLogger
extends java.lang.Object
implements org.apache.catalina.Logger

Version:
  1.1.1.1 2001/11/11 17:36:28
Author:
  Lawrence Karnowski , Craig R. McClanahan (Apache Jakarta, Tomcat project)

Field Summary
`protected org.apache.catalina.Container` `container` The Container with which this Logger has been associated.
`protected static java.lang.String` `info` The descriptive information about this implementation.
`protected org.apache.log4j.Category` `logger` The Log4J category to log messages to.
`static java.lang.String` `propFilename` The hard-coded location of the Log4J properties file under the OpenNMS home directory.
`protected java.beans.PropertyChangeSupport` `support` The property change support for this component.
`protected int` `verbosity` The verbosity level for above which log messages may be filtered.

Fields inherited from interface org.apache.catalina.Logger
`DEBUG, ERROR, FATAL, INFORMATION, WARNING`

Constructor Summary
`Log4JLogger()`

Method Summary
`void` `addPropertyChangeListener(java.beans.PropertyChangeListener listener)` Add a property change listener to this component.
`org.apache.catalina.Container` `getContainer()` Return the Container with which this Logger has been associated.
`java.lang.String` `getInfo()` Return descriptive information about this Logger implementation and the corresponding version number, in the format `<description>/<version>`.
`int` `getVerbosity()` Return the verbosity level of this logger.
`void` `log(java.lang.Exception exception, java.lang.String msg)` Writes the specified exception, and message, to a servlet log file.
`void` `log(java.lang.String msg)` Writes the specified message to a servlet log file, usually an event log.
`void` `log(java.lang.String message, int verbosity)` Writes the specified message to the servlet log file, usually an event log, if the logger is set to a verbosity level equal to or higher than the specified value for this message.
`void` `log(java.lang.String msg, java.lang.Throwable throwable)` Writes an explanatory message and a stack trace for a given `Throwable` exception to the servlet log file.
`void` `log(java.lang.String message, java.lang.Throwable throwable, int verbosity)` Writes the specified message and exception to the servlet log file, usually an event log, if the logger is set to a verbosity level equal to or higher than the specified value for this message.
`void` `removePropertyChangeListener(java.beans.PropertyChangeListener listener)` Remove a property change listener from this component.
`void` `setContainer(org.apache.catalina.Container container)` Set the Container with which this Logger has been associated.
`void` `setHomeDir(java.lang.String homeDir)` Required parameter so we can find the Log4J config file.
`void` `setVerbosity(int verbosity)` Set the verbosity level of this logger.
`void` `setVerbosityLevel(java.lang.String verbosity)` Set the verbosity level of this logger.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### container

    protected org.apache.catalina.Container container

  The Container with which this Logger has been associated.

### info

    protected static final java.lang.String info

  The descriptive information about this implementation.

  See Also:
    Constant Field Values

### propFilename

    public static final java.lang.String propFilename

  The hard-coded location of the Log4J properties file under the OpenNMS home directory.

  See Also:
    Constant Field Values

### support

    protected java.beans.PropertyChangeSupport support

  The property change support for this component.

### verbosity

    protected int verbosity

  The verbosity level for above which log messages may be filtered.

### logger

    protected org.apache.log4j.Category logger

  The Log4J category to log messages to.

Constructor Detail

### Log4JLogger

    public Log4JLogger()

Method Detail

### getContainer

    public org.apache.catalina.Container getContainer()

  Return the Container with which this Logger has been associated.

  Specified by:
    `getContainer` in interface `org.apache.catalina.Logger`

### setContainer

    public void setContainer(org.apache.catalina.Container container)

  Set the Container with which this Logger has been associated.

  Specified by:
    `setContainer` in interface `org.apache.catalina.Logger`
  Parameters:
    `container` - The associated Container

### getInfo

    public java.lang.String getInfo()

  Return descriptive information about this Logger implementation and the corresponding version number, in the format `<description>/<version>`.

  Specified by:
    `getInfo` in interface `org.apache.catalina.Logger`

### getVerbosity

    public int getVerbosity()

  Return the verbosity level of this logger. Messages logged with a higher verbosity than this level will be silently ignored.

  Specified by:
    `getVerbosity` in interface `org.apache.catalina.Logger`

### setVerbosity

    public void setVerbosity(int verbosity)

  Set the verbosity level of this logger. Messages logged with a higher verbosity than this level will be silently ignored.

  Specified by:
    `setVerbosity` in interface `org.apache.catalina.Logger`
  Parameters:
    `verbosity` - The new verbosity level

### setVerbosityLevel

    public void setVerbosityLevel(java.lang.String verbosity)

  Set the verbosity level of this logger. Messages logged with a higher verbosity than this level will be silently ignored.

  Parameters:
    `verbosity` - The new verbosity level, as a string

### setHomeDir

    public void setHomeDir(java.lang.String homeDir)

  Required parameter so we can find the Log4J config file.

### addPropertyChangeListener

    public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)

  Add a property change listener to this component.

  Specified by:
    `addPropertyChangeListener` in interface `org.apache.catalina.Logger`
  Parameters:
    `listener` - The listener to add

### log

    public void log(java.lang.String msg)

  Writes the specified message to a servlet log file, usually an event log. The name and type of the servlet log is specific to the servlet container. This message will be logged unconditionally.

  Specified by:
    `log` in interface `org.apache.catalina.Logger`
  Parameters:
    `msg` - A `String` specifying the message to be written to the log file.

### log

    public void log(java.lang.Exception exception,
                    java.lang.String msg)

  Writes the specified exception, and message, to a servlet log file. The implementation of this method should call `log(msg, exception)` instead. This method is deprecated in the ServletContext interface, but not deprecated here to avoid many useless compiler warnings. This message will be logged unconditionally.

  Specified by:
    `log` in interface `org.apache.catalina.Logger`
  Parameters:
    `exception` - An `Exception` to be reported
    `msg` - The associated message string

### log

    public void log(java.lang.String msg,
                    java.lang.Throwable throwable)

  Writes an explanatory message and a stack trace for a given `Throwable` exception to the servlet log file. The name and type of the servlet log file is specific to the servlet container, usually an event log. This message will be logged unconditionally.

  Specified by:
    `log` in interface `org.apache.catalina.Logger`
  Parameters:
    `msg` - A `String` that describes the error or exception
    `throwable` - The `Throwable` error or exception

### log

    public void log(java.lang.String message,
                    int verbosity)

  Writes the specified message to the servlet log file, usually an event log, if the logger is set to a verbosity level equal to or higher than the specified value for this message.

  Specified by:
    `log` in interface `org.apache.catalina.Logger`
  Parameters:
    `message` - A `String` specifying the message to be written to the log file
    `verbosity` - Verbosity level of this message

### log

    public void log(java.lang.String message,
                    java.lang.Throwable throwable,
                    int verbosity)

  Writes the specified message and exception to the servlet log file, usually an event log, if the logger is set to a verbosity level equal to or higher than the specified value for this message.

  Specified by:
    `log` in interface `org.apache.catalina.Logger`
  Parameters:
    `message` - A `String` that describes the error or exception
    `throwable` - The `Throwable` error or exception
    `verbosity` - Verbosity level of this message

### removePropertyChangeListener

    public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)

  Remove a property change listener from this component.

  Specified by:
    `removePropertyChangeListener` in interface `org.apache.catalina.Logger`
  Parameters:
    `listener` - The listener to remove

OpenNMS API 1.2.9

Generated by ranger on May 19 2007 2335.