org.apache.log4j.db
Class DBAppender2
java.lang.Object
|
+--org.apache.log4j.spi.ComponentBase
|
+--org.apache.log4j.AppenderSkeleton
|
+--org.apache.log4j.db.DBAppender2
- All Implemented Interfaces:
- Appender, Component, OptionHandler
- public class DBAppender2
- extends AppenderSkeleton
- Author:
- Ceki Gülcü
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, getFilter, getFirstFilter, getLayout, getName, getThreshold, isAsSevereAsThreshold, setLayout, setName, setThreshold |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DBAppender2
public DBAppender2()
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.
Copyright 2000-2005 Apache Software Foundation.