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
8 9 10 |
# File 'lib/appsignal/utils/integration_logger.rb', line 8 def seen_keys @seen_keys ||= Set.new end |
#warn_once_then_debug(key, message) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/appsignal/utils/integration_logger.rb', line 12 def warn_once_then_debug(key, ) if seen_keys.add?(key).nil? debug else warn end end |