VariableContext containing basic variables{}, inserts params into
the pattern and returns resulting StringStructLogger fields
and specifying used VariableContext and name of logger (underlying slf4j logger)
Typical usage:
public class Example {
@VarContext(context = DefaultContext.class)
private static StructLogger<DefaultContext> defaultLog = StructLogger.instance();
}
VarContextProvider annotated classes, LoggerContext annotated StructLogger fields
and takes care of replacing all valid structured log statements with generated structured log events invocations of slf4j logging APIMethodInvocationTreeLogInvocationScannerVariableContext classLoggerContext annotation on StructLogger fieldVariableContext interfacesVar annotated methodsVarContextProviderVarContextProviderStructLogger field, it is considered structured log statement and is
expression is transformed in such way, that method chain is replaced with one call to corresponding infoEvent, errorEvent,...Copyright © 2018. All rights reserved.