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
{{ message }}
Repository navigation
Structured Logging with Stack Driver Logback Appender #2669
Currently there is a Java Logback Appender that allows Java Applications to utilize the SLF4J interface and log to StackDriver.
SLF4J has the concept of Marker objects that allows users to include objects to enrich the log messages. It seems that the StackDriver Logback Appender is ignoring these Marker objects while logging to StackDriver.
To show an example, the following log statement:
logger.with(anObject).info("The request was successful");
will result a Logstash with the following structure:
{
labels: { ... labels here ... },
logName: 'java.log',
resource: { ... resource here ... },
severity: 'INFO',
textPayload: "The request was successful",
timestamp: "2017-11-30T01:21:59.205Z
}
It seems like the Appender is completely ignoring these Marker objects when the should be getting jumped into the jsonPayload attribute of the com.google.loggingLogEntry class.
Any help surrounding getting structured logging working with the StackDriver Logback Appender working would be greatly appreciated!
Activity
bspradling commentedon Nov 30, 2017
As an update, it appears the issue would be here:
It assumes that all data coming into the LoggingEvent is a StringPayload
pongad commentedon Dec 7, 2017
@jabubake @andreamlin I'm not too sure how severe this problem is. I tagged P1, but please change if appropriate.
jabubake commentedon Dec 11, 2017
@bspradling8 : Markers is not currently supported, but we will look into adding them in a release soon.
jabubake commentedon Dec 11, 2017
@dzlier-gcp FYI
pongad commentedon Dec 11, 2017
@jabubake I think @andreamlin is now working on the autogen-clients, so I think this feature is on my plate. I'll self-assign.
yihanzhen commentedon Jan 30, 2018
Move this issue to feature backlog and close it here. The place can continue to be used for discussion.
sschwell commentedon Feb 1, 2021
Is this still in backlog? or has it been fixed?
chore: Update generation configuration at Wed Aug 14 02:15:34 UTC 2024 (
chore(main): release 1.146.1-SNAPSHOT (#2669)
chore(main): release 1.146.1-SNAPSHOT (#2669)
chore(main): release 2.66.0 (googleapis#2669)