Sha256: 530db5e42435d4b66f470951c6b0847761977b7db740aa99f607ec5f3f46571e
Contents?: true
Size: 478 Bytes
Versions: 80
Compression:
Stored size: 478 Bytes
Contents
# frozen_string_literal: true module Appsignal module Utils # Subclass of logger with method to only log a warning once # prevents the local log from filling up with repeated messages. class IntegrationLogger < ::Logger def seen_keys @seen_keys ||= Set.new end def warn_once_then_debug(key, message) if seen_keys.add?(key).nil? debug message else warn message end end end end end
Version data entries
80 entries across 80 versions & 1 rubygems