Adding client.setup_logging() duplicate abseil log messages (stdout+sterr) #40
Labels
api: logging
Issues related to the googleapis/python-logging API.
priority: p2
Moderately-important priority. Fix may not be included in next release.
🚨
This issue needs some love.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Environment details
google-cloud-logging
version: 1.15.0Steps to reproduce
client.setup_logging()
For this test I redirect all messages to the stdout stream. This is what we see since all logs messages are only the
out
fileclient.setup_logging()
We can see that on the stdout stream we have few more messages on top of the orginal output which is expected when adding new service. Now on the stderr stream we see messages (before we had nothing)
I tried to look in more details to the logger:
but in both cases I see:
In the documentation it is just mentioned that we should add 2 lines to use
google.cloud.logging
. It seems that something else need to be setup to avoid duplicate. I didn't run the exact simple code on GCP but similar code show also duplicate in Stackdriver one time with the label "INFO" (from stdout stream) and one time with the label "ERROR" (from stderr stream). Here what I see on Stackdriver. Abseil messages are duplicated. WARNING and ERROR are shown 3 times:)
How can we log messages from abseil only one time ? On Stackoverflow people suggested me to open a ticket.
Code example
Here my
test_logging_3.py
file:The text was updated successfully, but these errors were encountered: