You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After upgrade from flogger 0.6 to flogger 0.7.1 I am observing an unexpected suffix in our log messages. We are using flogger-system-backend and flogger-grpc-context maven dependencies.
We are using context based log levels. We have code like:
final var logLevelMap = buildLogLevelMap();
ScopedLoggingContext.getInstance()
.newContext()
.withLogLevelMap(logLevelMap)
.install();
For example if I have a log statement like:
log.atFine().log("My message");
Then I will see the log record message as "My message [CONTEXT forced=true ]".
I have made a couple observations from the debugger:
GrpcContextData::shouldForceLoggingFor method seems to return true for all cases where the message should be logged according the the log level map, regardless of whether the message would have been logged anyway according to system log levels. So once we start using the log level map I am seeing the suffix get added for every single log message.
LogContext constructor calls an addMetadata method when the isForced parameter is true. It seems like it is this "metadata" that is being appended as a suffix to all the log messages.
I don't think that appending a suffix to all the log messages should be the default behavior when using context based log level maps.
Is there a way to turn off the suffix?
The text was updated successfully, but these errors were encountered:
After upgrade from flogger 0.6 to flogger 0.7.1 I am observing an unexpected suffix in our log messages. We are using flogger-system-backend and flogger-grpc-context maven dependencies.
We are using context based log levels. We have code like:
final var logLevelMap = buildLogLevelMap();
ScopedLoggingContext.getInstance()
.newContext()
.withLogLevelMap(logLevelMap)
.install();
For example if I have a log statement like:
log.atFine().log("My message");
Then I will see the log record message as "My message [CONTEXT forced=true ]".
I have made a couple observations from the debugger:
I don't think that appending a suffix to all the log messages should be the default behavior when using context based log level maps.
Is there a way to turn off the suffix?
The text was updated successfully, but these errors were encountered: