Log4j 1.3alpha-3

org.apache.log4j.db
Class DBAppender2

java.lang.Object
  |
  +--org.apache.log4j.AppenderSkeleton
        |
        +--org.apache.log4j.db.DBAppender2
All Implemented Interfaces:
Appender, OptionHandler

public class DBAppender2
extends AppenderSkeleton

Author:
Ceki Gülcü

Field Summary
 
Fields inherited from class org.apache.log4j.AppenderSkeleton
closed, errorHandler, headFilter, layout, name, tailFilter, threshold
 
Constructor Summary
DBAppender2()
           
 
Method Summary
 void activateOptions()
          Derived appenders should override this method if option structure requires it.
protected  void append(LoggingEvent event)
          Subclasses of AppenderSkeleton should implement this method to perform actual logging.
 void close()
          Release any resources allocated within the appender such as file handles, network connections, etc.
 ConnectionSource getConnectionSource()
           
 boolean getLocationInfo()
          Returns value of the LocationInfo property which determines whether caller's location info is written to the database.
 boolean requiresLayout()
           
 void setConnectionSource(ConnectionSource connectionSource)
           
 void setLocationInfo(boolean locationInfo)
          If true, the information written to the database will include caller's location information.
 
Methods inherited from class org.apache.log4j.AppenderSkeleton
addFilter, clearFilters, doAppend, finalize, getErrorHandler, getFilter, getFirstFilter, getLayout, getLogger, getName, getThreshold, isAsSevereAsThreshold, setErrorHandler, setLayout, setName, setThreshold
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DBAppender2

public DBAppender2()
Method Detail

activateOptions

public void activateOptions()
Description copied from class: AppenderSkeleton
Derived appenders should override this method if option structure requires it.

Specified by:
activateOptions in interface OptionHandler
Overrides:
activateOptions in class AppenderSkeleton

getConnectionSource

public ConnectionSource getConnectionSource()
Returns:
Returns the connectionSource.

setConnectionSource

public void setConnectionSource(ConnectionSource connectionSource)
Parameters:
connectionSource - The connectionSource to set.

append

protected void append(LoggingEvent event)
Description copied from class: AppenderSkeleton
Subclasses of AppenderSkeleton should implement this method to perform actual logging. See also AppenderSkeleton.doAppend method.

Specified by:
append in class AppenderSkeleton

close

public void close()
Description copied from interface: 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.


requiresLayout

public boolean requiresLayout()

getLocationInfo

public boolean getLocationInfo()
Returns value of the LocationInfo property which determines whether caller's location info is written to the database.


setLocationInfo

public void setLocationInfo(boolean locationInfo)
If true, the information written to the database will include caller's location information. Due to performance concerns, by default no location information is written to the database.


Log4j 1.3alpha-3

Copyright 2000-2003 Apache Software Foundation.