public class XMLDecoder extends Object implements Decoder
Constructor and Description |
---|
XMLDecoder()
Create new instance.
|
XMLDecoder(Component o)
Create new instance.
|
Modifier and Type | Method and 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 |
decode(URL url)
Decodes a File into a Vector of LoggingEvents.
|
Vector |
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.
|
public XMLDecoder(Component o)
o
- ownerpublic XMLDecoder()
public void setAdditionalProperties(Map properties)
setAdditionalProperties
in interface Decoder
properties
- additional propertiespublic Vector decode(URL url) throws IOException
decode
in interface Decoder
url
- the url of a file containing events to decodeIOException
- if IO error during processing.public Vector decodeEvents(String document)
decodeEvents
in interface Decoder
document
- to decode events frompublic org.apache.log4j.spi.LoggingEvent decode(String data)
Copyright © 2002-2017 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache Chainsaw, Chainsaw, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.