Class AbstractJacksonLogEventParser
java.lang.Object
org.apache.logging.log4j.core.parser.AbstractJacksonLogEventParser
- All Implemented Interfaces:
LogEventParser
,TextLogEventParser
- Direct Known Subclasses:
JsonLogEventParser
,XmlLogEventParser
,YamlLogEventParser
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final com.fasterxml.jackson.databind.ObjectReader
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractJacksonLogEventParser
(com.fasterxml.jackson.databind.ObjectMapper objectMapper) -
Method Summary
-
Field Details
-
objectReader
private final com.fasterxml.jackson.databind.ObjectReader objectReader
-
-
Constructor Details
-
AbstractJacksonLogEventParser
AbstractJacksonLogEventParser(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
-
Method Details
-
parseFrom
Description copied from interface:TextLogEventParser
Parses a String, which is expected to contain exactly one log event.- Specified by:
parseFrom
in 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:LogEventParser
Parses a byte array, which is expected to contain exactly one log event.- Specified by:
parseFrom
in 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:LogEventParser
Parses a specified range in a byte array. The specified range is expected to contain exactly one log event.- Specified by:
parseFrom
in 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
-