Package org.apache.log4j.xml
Class UtilLoggingXMLDecoder
- java.lang.Object
-
- org.apache.log4j.xml.UtilLoggingXMLDecoder
-
-
Constructor Summary
Constructors Constructor Description UtilLoggingXMLDecoder()
Create new instance.UtilLoggingXMLDecoder(Component o)
Create new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.log4j.spi.LoggingEvent
decode(String data)
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.Vector<org.apache.log4j.spi.LoggingEvent>
decode(URL url)
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.void
setAdditionalProperties(Map properties)
Sets an additionalProperty map, where each Key/Value pair is automatically added to each LoggingEvent as it is decoded.
-
-
-
Constructor Detail
-
UtilLoggingXMLDecoder
public UtilLoggingXMLDecoder(Component o)
Create new instance.- Parameters:
o
- owner
-
UtilLoggingXMLDecoder
public UtilLoggingXMLDecoder()
Create new instance.
-
-
Method Detail
-
setAdditionalProperties
public void setAdditionalProperties(Map properties)
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:
setAdditionalProperties
in interfaceDecoder
- Parameters:
properties
- additional properties
-
decode
public Vector<org.apache.log4j.spi.LoggingEvent> decode(URL url) throws IOException
Decodes a File into a Vector of LoggingEvents.- Specified by:
decode
in interfaceDecoder
- Parameters:
url
- the url of a file containing events to decode- Returns:
- Vector of LoggingEvents
- Throws:
IOException
- if IO error during processing.
-
decodeEvents
public Vector<org.apache.log4j.spi.LoggingEvent> decodeEvents(String document)
Decodes a String representing a number of events into a Vector of LoggingEvents.- Specified by:
decodeEvents
in interfaceDecoder
- Parameters:
document
- to decode events from- Returns:
- Vector of LoggingEvents
-
decode
public org.apache.log4j.spi.LoggingEvent decode(String data)
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.
-
-