Sha256: faf4f0cd265e8f75ccf8ddae555038e58fc5f33d74b12e7ee82a575d2cbeee30
Contents?: true
Size: 615 Bytes
Versions: 41
Compression:
Stored size: 615 Bytes
Contents
# (c) Copyright IBM Corp. 2021 # (c) Copyright Instana Inc. 2021 module Instana class InstrumentedLogger < Logger LEVEL_LABELS = %w[Debug Info Warn Error Fatal Any].freeze def instana_log_level WARN end def add(severity, message = nil, progname = nil) severity ||= UNKNOWN if severity >= instana_log_level && ::Instana.tracer.tracing? tags = { level: LEVEL_LABELS[severity], message: "#{message} #{progname}".strip } Instana::Tracer.trace(:log, {log: tags}) {} end super(severity, message, progname) end end end
Version data entries
41 entries across 41 versions & 1 rubygems