Package org.apache.log4j.nt
Class NTEventLogAppender
java.lang.Object
org.apache.log4j.AppenderSkeleton
org.apache.log4j.nt.NTEventLogAppender
- All Implemented Interfaces:
Appender,OptionHandler
Append to the NT event log system.
WARNING This appender can only be installed and used on a Windows system.
Do not forget to place NTEventLogAppender.dll, NTEventLogAppender.amd64.dll, NTEventLogAppender.ia64.dll or NTEventLogAppender.x86.dll as appropriate in a directory that is on the PATH of the Windows system. Otherwise, you will get a java.lang.UnsatisfiedLinkError.
- Author:
- Chris Taylor, Jim Cakalic
-
Field Summary
Fields inherited from class org.apache.log4j.AppenderSkeleton
closed, errorHandler, headFilter, layout, name, tailFilter, threshold -
Constructor Summary
ConstructorsConstructorDescriptionNTEventLogAppender(String source) NTEventLogAppender(String server, String source) NTEventLogAppender(String server, String source, Layout layout) NTEventLogAppender(String source, Layout layout) NTEventLogAppender(Layout layout) -
Method Summary
Modifier and TypeMethodDescriptionvoidDerived appenders should override this method if option structure requires it.voidappend(LoggingEvent event) Subclasses ofAppenderSkeletonshould implement this method to perform actual logging.voidclose()Release any resources allocated within the appender such as file handles, network connections, etc.voidfinalize()Finalize this appender by calling the derived class'closemethod.booleanTheNTEventLogAppenderrequires a layout.voidThe Source option which names the source of the event.Methods inherited from class org.apache.log4j.AppenderSkeleton
addFilter, clearFilters, doAppend, getErrorHandler, getFilter, getFirstFilter, getLayout, getName, getThreshold, isAsSevereAsThreshold, setErrorHandler, setLayout, setName, setThreshold
-
Constructor Details
-
NTEventLogAppender
public NTEventLogAppender() -
NTEventLogAppender
-
NTEventLogAppender
-
NTEventLogAppender
-
NTEventLogAppender
-
NTEventLogAppender
-
-
Method Details
-
close
public void close()Description copied from interface:AppenderRelease any resources allocated within the appender such as file handles, network connections, etc.It is a programming error to append to a closed appender.
-
activateOptions
public void activateOptions()Description copied from class:AppenderSkeletonDerived appenders should override this method if option structure requires it.- Specified by:
activateOptionsin interfaceOptionHandler- Overrides:
activateOptionsin classAppenderSkeleton
-
append
Description copied from class:AppenderSkeletonSubclasses ofAppenderSkeletonshould implement this method to perform actual logging. See alsoAppenderSkeleton.doAppendmethod.- Specified by:
appendin classAppenderSkeleton
-
finalize
public void finalize()Description copied from class:AppenderSkeletonFinalize this appender by calling the derived class'closemethod.- Overrides:
finalizein classAppenderSkeleton
-
setSource
The Source option which names the source of the event. The current value of this constant is Source. -
getSource
-
requiresLayout
public boolean requiresLayout()TheNTEventLogAppenderrequires a layout. Hence, this method always returnstrue.
-