Class XmlLogEventParser
java.lang.Object
org.apache.logging.log4j.core.parser.XmlLogEventParser
- All Implemented Interfaces:
LogEventParser,TextLogEventParser
Parses the output from XmlLayout layout into instances of
LogEvent.-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
XmlLogEventParser
public XmlLogEventParser()
-
-
Method Details
-
parseFrom
Description copied from interface:TextLogEventParserParses a String, which is expected to contain exactly one log event.- Specified by:
parseFromin interfaceTextLogEventParser- Parameters:
input- the string- Returns:
- the parsed LogEvent, never
null. - Throws:
ParseException- if the input is malformed and cannot be parsed as a LogEvent
-
parseFrom
Description copied from interface:LogEventParserParses a byte array, which is expected to contain exactly one log event.- Specified by:
parseFromin interfaceLogEventParser- Parameters:
input- the byte array- Returns:
- the parsed LogEvent, never
null. - Throws:
ParseException- if the input is malformed and cannot be parsed as a LogEvent
-
parseFrom
Description copied from interface:LogEventParserParses a specified range in a byte array. The specified range is expected to contain exactly one log event.- Specified by:
parseFromin interfaceLogEventParser- Parameters:
input- the byte arrayoffset- the initial offsetlength- the length- Returns:
- the parsed LogEvent, never
null. - Throws:
ParseException- if the input is malformed and cannot be parsed as a LogEvent
-