#Disabling opentelemetry logs
1 messages · Page 1 of 1 (latest)
How do you setup your logging?
@small merlin, do you mind moving the discussion here?
@small merlin, based on your config, I think what's happening is that you're adding the StreamHandler to all loggers, with basicConfig. So adding the NullHandler doesn't remove that StreamHandler.
Sorry yes - I only saw these messages now
Okay thanks, do you know how to fix that?
I actually prefer configuring logging with dictConfig rather that basicConfig like in https://github.com/dagger/dagger/blob/0b466c70cf1828642815306aed02a1ce7b72d172/sdk/python/src/dagger/log.py, but try this:
otel_logger = logging.getLogger("opentelemetry")
otel_logger.propagate = False
otel_logger.addHandler(logging.NullHandler())
Just one question, are the logs themselves not reflective of an underlying issue? My understand that these methods simply stop the logs, but something is still happening at the end of my pipeline, it is just no logger logging?
Okay wait nvm, that is what the get_tracer_provider().shutdown() is for