Class UtilLoggingXMLDecoder
java.lang.Object
org.apache.log4j.xml.UtilLoggingXMLDecoder
- All Implemented Interfaces:
Decoder
-
Constructor Summary
ConstructorsConstructorDescriptionCreate new instance.Create new instance. -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.log4j.spi.LoggingEventConverts the string data into an XML Document, and then soaks out the relevant bits to form a new LoggingEvent instance which can be used by any Log4j element locally.Vector<org.apache.log4j.spi.LoggingEvent> Decodes a File into a Vector of LoggingEvents.Vector<org.apache.log4j.spi.LoggingEvent> decodeEvents(String document) Decodes a String representing a number of events into a Vector of LoggingEvents.voidsetAdditionalProperties(Map properties) Sets an additionalProperty map, where each Key/Value pair is automatically added to each LoggingEvent as it is decoded.
-
Constructor Details
-
UtilLoggingXMLDecoder
-
UtilLoggingXMLDecoder
public UtilLoggingXMLDecoder()Create new instance.
-
-
Method Details
-
setAdditionalProperties
Sets an additionalProperty map, where each Key/Value pair is automatically added to each LoggingEvent as it is decoded.This is useful, say, to include the source file name of the Logging events
- Specified by:
setAdditionalPropertiesin interfaceDecoder- Parameters:
properties- additional properties
-
decode
Decodes a File into a Vector of LoggingEvents.- Specified by:
decodein interfaceDecoder- Parameters:
url- the url of a file containing events to decode- Returns:
- Vector of LoggingEvents
- Throws:
IOException- if IO error during processing.
-
decodeEvents
Decodes a String representing a number of events into a Vector of LoggingEvents.- Specified by:
decodeEventsin interfaceDecoder- Parameters:
document- to decode events from- Returns:
- Vector of LoggingEvents
-
decode
Converts the string data into an XML Document, and then soaks out the relevant bits to form a new LoggingEvent instance which can be used by any Log4j element locally.
-