lib/ougai/child_logger.rb in ougai-1.4.3 vs lib/ougai/child_logger.rb in ougai-1.4.4
- old
+ new
@@ -1,17 +1,20 @@
module Ougai
+ # A logger created by the `child` method of parent logger
class ChildLogger
include Logging
+ # @private
def initialize(parent, fields)
@parent = parent
@with_fields = fields
end
def level
@parent.level
end
+ # @private
def chain(severity, args, fields, hooks)
hooks.push(@before_log) if @before_log
@parent.chain(severity, args, merge_fields(@with_fields, fields), hooks)
end