lib/ddtrace/tracer.rb in ddtrace-0.20.0 vs lib/ddtrace/tracer.rb in ddtrace-0.21.0
- old
+ new
@@ -51,11 +51,16 @@
end
@logger = logger
end
# Activate the debug mode providing more information related to tracer usage
+ # Default to Warn level unless using custom logger
def self.debug_logging=(value)
- log.level = value ? Logger::DEBUG : Logger::WARN
+ if value
+ log.level = Logger::DEBUG
+ elsif log.is_a?(Datadog::Logger)
+ log.level = Logger::WARN
+ end
end
# Return if the debug mode is activated or not
def self.debug_logging
log.level == Logger::DEBUG