Sha256: 6a85d32410edc138a3d3c7dffc0b9022d0f019a9bcb594975305349350704779

Contents?: true

Size: 513 Bytes

Versions: 4

Compression:

Stored size: 513 Bytes

Contents

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

module Logging
  class Logger

    # 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

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
bixby-common-0.4.4 lib/bixby-common/util/log/logger.rb
bixby-common-0.4.3 lib/bixby-common/util/log/logger.rb
bixby-common-0.4.2 lib/bixby-common/util/log/logger.rb
bixby-common-0.4.1 lib/bixby-common/util/log/logger.rb