Class: Appsignal::Utils::IntegrationLogger
- Defined in:
- lib/appsignal/utils/integration_logger.rb
Overview
Subclass of logger with method to only log a warning once prevents the local log from filling up with repeated messages.
Instance Method Summary collapse
Instance Method Details
#seen_keys ⇒ Object
6 7 8 |
# File 'lib/appsignal/utils/integration_logger.rb', line 6 def seen_keys @seen_keys ||= Set.new end |
#warn_once_then_debug(key, message) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/appsignal/utils/integration_logger.rb', line 10 def warn_once_then_debug(key, ) if !seen_keys.add?(key).nil? warn else debug end end |