Class MarkerResolver
java.lang.Object
org.apache.logging.log4j.layout.template.json.resolver.MarkerResolver
- All Implemented Interfaces:
EventResolver,TemplateResolver<LogEvent>
A
Marker resolver.
Configuration
config = "field" -> "name"
Examples
Resolve the marker name:
{
"$resolver": "marker",
"field": "name"
}
-
Method Summary
Modifier and TypeMethodDescriptionbooleanisResolvable(LogEvent logEvent) Indicates if the resolver if applicable for the givenvalue.voidresolve(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, resolve
-
Method Details
-
isResolvable
Description copied from interface:TemplateResolverIndicates if the resolver if applicable for the givenvalue.For instance, the stack trace resolver can be short-circuited using this check if the stack traces are disabled in the layout configuration.
- Specified by:
isResolvablein interfaceTemplateResolver<LogEvent>
-
resolve
Description copied from interface:TemplateResolverResolves the givenvalueusing the providedJsonWriter.- Specified by:
resolvein interfaceTemplateResolver<LogEvent>
-