Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.jcorporate.expresso.core.logging
Class DBAppender  view DBAppender download DBAppender.java

java.lang.Object
  extended byorg.apache.log4j.AppenderSkeleton
      extended bycom.jcorporate.expresso.core.logging.DBAppender
All Implemented Interfaces:
org.apache.log4j.Appender, org.apache.log4j.spi.OptionHandler

public class DBAppender
extends org.apache.log4j.AppenderSkeleton

JDBC type appender for Log4j


Field Summary
private static int DEBUG
           
private static int ERROR
           
private static int INFO
           
private static java.lang.String thisClass
           
private static int WARN
           
 
Fields inherited from class org.apache.log4j.AppenderSkeleton
closed, errorHandler, headFilter, layout, name, tailFilter, threshold
 
Constructor Summary
DBAppender()
           
 
Method Summary
protected  void append(org.apache.log4j.spi.LoggingEvent parm1)
          Uses Expresso's Log Handler.
 void close()
          Release any resources allocated within the appender such as file handles, network connections, etc.
protected static void log(int messageLevel, java.lang.String objectName, java.lang.String msg, java.lang.String color)
          Log a message from a particular object with a color at the given level
protected static void log(java.lang.String objectName, java.lang.Throwable e)
          Log an exception from a particular object
 boolean requiresLayout()
          Configurators call this method to determine if the appender requires a layout.
 
Methods inherited from class org.apache.log4j.AppenderSkeleton
activateOptions, addFilter, clearFilters, doAppend, finalize, getErrorHandler, getFilter, getFirstFilter, getLayout, getName, getThreshold, isAsSevereAsThreshold, setErrorHandler, setLayout, setName, setThreshold
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ERROR

private static final int ERROR

WARN

private static final int WARN

INFO

private static final int INFO

DEBUG

private static final int DEBUG

thisClass

private static final java.lang.String thisClass
See Also:
Constant Field Values
Constructor Detail

DBAppender

public DBAppender()
Method Detail

requiresLayout

public boolean requiresLayout()
Description copied from interface: org.apache.log4j.Appender
Configurators call this method to determine if the appender requires a layout. If this method returns true, meaning that layout is required, then the configurator will configure an layout using the configuration information at its disposal. If this method returns false, meaning that a layout is not required, then layout configuration will be skipped even if there is available layout configuration information at the disposal of the configurator..

In the rather exceptional case, where the appender implementation admits a layout but can also work without it, then the appender should return true.


append

protected void append(org.apache.log4j.spi.LoggingEvent parm1)
Uses Expresso's Log Handler.


log

protected static void log(java.lang.String objectName,
                          java.lang.Throwable e)
                   throws LogException
Log an exception from a particular object


log

protected static void log(int messageLevel,
                          java.lang.String objectName,
                          java.lang.String msg,
                          java.lang.String color)
                   throws LogException
Log a message from a particular object with a color at the given level


close

public void close()
Description copied from interface: org.apache.log4j.Appender
Release any resources allocated within the appender such as file handles, network connections, etc.

It is a programming error to append to a closed appender.