@Plugin(name="Win32EventLog",
category="Core",
elementType="appender",
printObject=true)
public class Win32EventLogAppender
extends org.apache.logging.log4j.core.appender.AbstractAppender
WARNING This appender can only be installed and used on a Windows system.
Do not forget to place jna.jar and platform.jar in the CLASSPATH.
| Constructor and Description |
|---|
Win32EventLogAppender(String name,
String server,
String source,
String application,
String eventMessageFile,
String categoryMessageFile,
org.apache.logging.log4j.core.Layout<? extends Serializable> layout,
org.apache.logging.log4j.core.Filter filter) |
| Modifier and Type | Method and Description |
|---|---|
void |
activateOptions() |
void |
append(org.apache.logging.log4j.core.LogEvent event) |
void |
close() |
static Win32EventLogAppender |
createAppender(String name,
String server,
String source,
String application,
String eventMessageFile,
String categoryMessageFile,
org.apache.logging.log4j.core.Layout<? extends Serializable> layout,
org.apache.logging.log4j.core.Filter filter) |
void |
finalize() |
String |
getApplication() |
String |
getCategoryMessageFile() |
String |
getEventMessageFile() |
String |
getSource() |
boolean |
requiresLayout()
The
Win32EventLogAppender requires a layout. |
void |
setApplication(String application)
The Application option which names the subsection of the
'Applications and Services Log'.
|
void |
setCategoryMessageFile(String categoryMessageFile)
The CategoryMessageFile option which sets file location of the
Catagory Messages
|
void |
setEventMessageFile(String eventMessageFile)
The EventMessageFile option which sets file location of the Event
Messages
|
void |
setSource(String source)
The Source option which names the source of the event.
|
error, error, error, getHandler, getLayout, getName, ignoreExceptions, parseInt, requiresLocation, setHandler, toSerializable, toStringaddFilter, getFilter, getPropertyArray, hasFilter, isFiltered, removeFilter, start, stop, stopequalsImpl, getState, getStatusLogger, hashCodeImpl, initialize, isInitialized, isStarted, isStarting, isStopped, isStopping, setStarted, setStarting, setState, setStopped, setStopping, stop, stoppublic Win32EventLogAppender(String name, String server, String source, String application, String eventMessageFile, String categoryMessageFile, org.apache.logging.log4j.core.Layout<? extends Serializable> layout, org.apache.logging.log4j.core.Filter filter)
name - The appender name Win32EventLogserver - The server for remote loggingsource - The Event View Sourceapplication - The Event View application (location)eventMessageFile - The message file location in the file systemcategoryMessageFile - The message file location in the file systemlayout - A Log4j Layoutfilter - A Log4j Filter@PluginFactory public static Win32EventLogAppender createAppender(@PluginAttribute(value="name") String name, @PluginAttribute(value="server") String server, @PluginAttribute(value="source") String source, @PluginAttribute(value="application") String application, @PluginAttribute(value="eventMessageFile") String eventMessageFile, @PluginAttribute(value="categoryMessageFile") String categoryMessageFile, @PluginElement(value="Layout") org.apache.logging.log4j.core.Layout<? extends Serializable> layout, @PluginElement(value="Filters") org.apache.logging.log4j.core.Filter filter)
name - The appender name Win32EventLogserver - The server for remote loggingsource - The Event View Sourceapplication - The Event View application (location)eventMessageFile - The message file location in the file systemcategoryMessageFile - The message file location in the file systemlayout - A Log4j Layoutfilter - A Log4j Filterpublic void setSource(String source)
public String getSource()
public void setApplication(String application)
application - The Event View application (location)public String getApplication()
public void close()
public void setEventMessageFile(String eventMessageFile)
eventMessageFile - The message file location in the file systempublic String getEventMessageFile()
public void setCategoryMessageFile(String categoryMessageFile)
categoryMessageFile - The message file location in the file systempublic String getCategoryMessageFile()
public void activateOptions()
public void append(org.apache.logging.log4j.core.LogEvent event)
public boolean requiresLayout()
Win32EventLogAppender requires a layout. Hence, this
method always returns true.Copyright © 2022 The Log4JNA Team. All rights reserved.