DataDog/dd-trace-py

Undesirable log handler added to the `ddtrace` logger

Closed this issue · 1 comments

ddtrace appears to be adding a handler to the ddtrace logger. This is not desirable in my situation because I only use the root log handler. I have tried removing the handler from this logger in my logging configuration (django), but it doesn't seem to go away. Maybe ddtrace-run is injecting it?

>>> logging.getLogger("ddtrace").handlers
[<StreamHandler <stderr> (NOTSET)>]

The ddtrace logger is configured when ddtrace is imported (here).

You can avoid setting the stream handler by setting the following environment variable: DD_TRACE_LOG_STREAM_HANDLER=False (code).