Interface TemplateResolver<V>
- All Known Subinterfaces:
EventResolver
,StackTraceResolver
- All Known Implementing Classes:
CaseConverterResolver
,CounterResolver
,EndOfBatchResolver
,ExceptionResolver
,ExceptionRootCauseResolver
,LevelResolver
,LoggerResolver
,MainMapResolver
,MapResolver
,MarkerResolver
,MessageParameterResolver
,MessageResolver
,PatternResolver
,ReadOnlyStringMapResolver
,SourceResolver
,StackTraceElementResolver
,StackTraceObjectResolver
,StackTraceStringResolver
,TemplateResolvers.UnresolvableTemplateResolver
,ThreadContextDataResolver
,ThreadContextStackResolver
,ThreadResolver
,TimestampResolver
,TimestampResolver.EpochResolver
,TimestampResolver.PatternResolver
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
-
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
Indicates if the resolution should be appended to the parent JSON object.default boolean
Indicates if the resolver if applicable at all.default boolean
isResolvable
(V value) Indicates if the resolver if applicable for the givenvalue
.void
resolve
(V value, JsonWriter jsonWriter) Resolves the givenvalue
using the providedJsonWriter
.default void
resolve
(V value, JsonWriter jsonWriter, boolean succeedingEntry) Resolves the givenvalue
using the providedJsonWriter
.
-
Method Details
-
isFlattening
default boolean isFlattening()Indicates 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. -
isResolvable
default boolean isResolvable()Indicates if the resolver if applicable at all.For instance, the source line resolver can be short-circuited using this check if the location information is disabled in the layout configuration.
-
isResolvable
Indicates 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.
-
resolve
Resolves the givenvalue
using the providedJsonWriter
. -
resolve
Resolves the givenvalue
using the providedJsonWriter
.- Parameters:
succeedingEntry
- false, if this is the first element in a collection; true, otherwise
-