Class MessageParameterResolver
java.lang.Object
org.apache.logging.log4j.layout.template.json.resolver.MessageParameterResolver
- All Implemented Interfaces:
EventResolver,TemplateResolver<LogEvent>
Message parameter (i.e., Message.getParameters()) resolver.
Configuration
config = [ stringified ] , [ index ] stringified = "stringified" -> boolean index = "index" -> number
Examples
Resolve the message parameters into an array:
{
"$resolver": "messageParameter"
}
Resolve the string representation of all message parameters into an array:
{
"$resolver": "messageParameter",
"stringified": true
}
Resolve the first message parameter:
{
"$resolver": "messageParameter",
"index": 0
}
Resolve the string representation of the first message parameter:
{
"$resolver": "messageParameter",
"index": 0,
"stringified": true
}
-
Method Summary
Modifier and TypeMethodDescriptionvoidresolve(LogEvent logEvent, JsonWriter jsonWriter) Resolves the givenvalueusing the providedJsonWriter.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.logging.log4j.layout.template.json.resolver.TemplateResolver
isFlattening, isResolvable, isResolvable, resolve
-
Method Details
-
resolve
Description copied from interface:TemplateResolverResolves the givenvalueusing the providedJsonWriter.- Specified by:
resolvein interfaceTemplateResolver<LogEvent>
-