Module: Honeybadger::Breadcrumbs::LogWrapper Private
- Defined in:
- lib/honeybadger/breadcrumbs/logging.rb
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
Instance Method Details
#add(severity, message = nil, progname = nil) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/honeybadger/breadcrumbs/logging.rb', line 6 def add(severity, = nil, progname = nil) org_severity, , org_progname = severity, , progname if defined?(Dry::Logger::Entry) && progname.is_a?(Dry::Logger::Entry) # Hanami uses dry-logger , progname = progname. || progname.exception, progname.progname else , progname = [progname, nil] if .nil? end = && .to_s.strip unless should_ignore_log?(, progname) Honeybadger.(, category: :log, metadata: { severity: format_severity(severity), progname: progname }) end super(org_severity, , org_progname) end |