Sha256: 0a79f7be240b525109cad89cd44c826d02e0283ad5ffc0f2137120252381c21a
Contents?: true
Size: 628 Bytes
Versions: 1
Compression:
Stored size: 628 Bytes
Contents
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 protected def append(severity, args) hooks = @before_log ? [@before_log] : [] @parent.chain(severity, args, @with_fields, hooks) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ougai-1.4.4 | lib/ougai/child_logger.rb |