Skip to content

When configuring dd-trace to use a logger, the passed in logger's level is manipulated. #681

Closed

Description

In the case of configuring the datadog trace client, when passing a custom logger into the datadog client the custom logger's level will be changed to WARN. This had a negative effect on our system, hiding all INFO logs. Example of our configuration:

    Datadog.configure do |c|
      c.tracer enabled: true, env: env_name, hostname: host, port: port, log: logger, debug: debug
      # etc...

Once Datadog trace is configured debug_logging= will be called here:
https://github.com/DataDog/dd-trace-rb/blob/master/lib/ddtrace/configuration.rb#L49

Because debug = false (a default) the log level for the passed in custom logger will be changed to WARN here:
https://github.com/DataDog/dd-trace-rb/blob/master/lib/ddtrace/tracer.rb#L57

My suggestion would be to keep the same behavior only if the detected logger configured is a Datadog::Logger otherwise noop. Thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

communityWas opened by a community membercoreInvolves Datadog core libraries

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions