-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add customer logging provider to support structured logging for SLF4J 1.x + Logback 1.2.x #3693
base: main
Are you sure you want to change the base?
Conversation
...ogging/logback-extension/src/main/java/com/google/api/logging/SDKLoggingMdcJsonProvider.java
Outdated
Show resolved
Hide resolved
for (Map.Entry<String, String> entry : mdcProperties.entrySet()) { | ||
String fieldName = entry.getKey(); | ||
String entryValueString = entry.getValue(); | ||
if (fieldName == null || entryValueString == null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logstash-logback has some customization capabilities that I suspect are fairly easy to restore here, like configure specific entries in the MDC to be included or excluded and renaming keys, ref: readme:mdc-fields. It might be as easy as adding these conditions here, or a bit more involved. Can you take a look? I think it nice to have it preserved.
https://github.com/logfellow/logstash-logback-encoder/blob/76f5295f35bc44518af91bfccb07a8ecb142229c/src/main/java/net/logstash/logback/composite/loggingevent/MdcJsonProvider.java#L102-L103
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added these features.
|
|
In this PR:
b/394880750