Sha256: 4108957d07bcc4c20f4ba5ca4feff19703a0be9cd835bd8af5c123662882f7d8

Contents?: true

Size: 560 Bytes

Versions: 14

Compression:

Stored size: 560 Bytes

Contents

# Patch Logging::Logger so that :trace becomes an inherited flag

require "logging"

module Logging
  class Logger
    # :nocov:

    # Override to pass trace flag from parent to child
    def initialize( name )
      case name
      when String
        raise(ArgumentError, "logger must have a name") if name.empty?
      else raise(ArgumentError, "logger name must be a String") end

      repo = ::Logging::Repository.instance
      parent = repo.parent(name)
      _setup(name, :parent => parent, :trace => parent.trace)
    end

    # :nocov:
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
bixby-common-0.6.5 lib/bixby-common/util/log/logger.rb
bixby-common-0.6.4 lib/bixby-common/util/log/logger.rb
bixby-common-0.6.3 lib/bixby-common/util/log/logger.rb
bixby-common-0.6.2 lib/bixby-common/util/log/logger.rb
bixby-common-0.6.1 lib/bixby-common/util/log/logger.rb
bixby-common-0.6.0 lib/bixby-common/util/log/logger.rb
bixby-common-0.5.0 lib/bixby-common/util/log/logger.rb
bixby-common-0.4.13 lib/bixby-common/util/log/logger.rb
bixby-common-0.4.12 lib/bixby-common/util/log/logger.rb
bixby-common-0.4.11 lib/bixby-common/util/log/logger.rb
bixby-common-0.4.10 lib/bixby-common/util/log/logger.rb
bixby-common-0.4.9 lib/bixby-common/util/log/logger.rb
bixby-common-0.4.8 lib/bixby-common/util/log/logger.rb
bixby-common-0.4.7 lib/bixby-common/util/log/logger.rb