Class: Logging::Logger

Inherits:
Object
  • Object
show all
Defined in:
lib/bixby-common/util/log/logger.rb

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Logger

Override to pass trace flag from parent to child



11
12
13
14
15
16
17
18
19
20
# File 'lib/bixby-common/util/log/logger.rb', line 11

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