Class MapResolver
java.lang.Object
org.apache.logging.log4j.layout.template.json.resolver.MapResolver
- All Implemented Interfaces:
EventResolver,TemplateResolver<LogEvent>
MapMessage resolver.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates if the resolution should be appended to the parent JSON object.booleanisResolvable(LogEvent logEvent) Indicates if the resolver if applicable for the givenvalue.voidresolve(LogEvent logEvent, JsonWriter jsonWriter) Resolves the givenvalueusing the providedJsonWriter.voidresolve(LogEvent logEvent, JsonWriter jsonWriter, boolean succeedingEntry) 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
isResolvable
-
Method Details
-
isFlattening
public boolean isFlattening()Description copied from interface:TemplateResolverIndicates if the resolution should be appended to the parent JSON object.For instance,
ThreadContextDataResolver, i.e., MDC resolver, uses this flag to indicate whether the contents should be appended to the parent JSON object or not.- Specified by:
isFlatteningin interfaceTemplateResolver<LogEvent>
-
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>
-
resolve
Description copied from interface:TemplateResolverResolves the givenvalueusing the providedJsonWriter.- Specified by:
resolvein interfaceTemplateResolver<LogEvent>- Parameters:
succeedingEntry- false, if this is the first element in a collection; true, otherwise
-