Class MainMapResolver
java.lang.Object
org.apache.logging.log4j.layout.template.json.resolver.MainMapResolver
- All Implemented Interfaces:
EventResolver,TemplateResolver<LogEvent>
An index-based resolver for the main() method arguments.
Configuration
config = index | key index = "index" -> number key = "key" -> string
Examples
Resolve the 1st main() method argument:
{
"$resolver": "main",
"index": 0
}
Resolve the argument coming right after --userId:
{
"$resolver": "main",
"key": "--userId"
}
- See Also:
-
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>
-