Skip to content
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

Undesirable log handler added to the ddtrace logger #11555

Closed
bradydean opened this issue Nov 26, 2024 · 1 comment
Closed

Undesirable log handler added to the ddtrace logger #11555

bradydean opened this issue Nov 26, 2024 · 1 comment
Assignees
Labels

Comments

@bradydean
Copy link

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)>]
@mabdinur
Copy link
Contributor

mabdinur commented Jan 2, 2025

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).

@mabdinur mabdinur closed this as completed Jan 2, 2025
@mabdinur mabdinur self-assigned this Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants