lib/ougai/child_logger.rb in ougai-1.4.4 vs lib/ougai/child_logger.rb in ougai-1.5.0

- old
+ new

@@ -11,9 +11,39 @@ def level @parent.level end + # Whether the current severity level allows for logging DEBUG. + # @return [Boolean] true if allows + def debug? + @parent.debug? + end + + # Whether the current severity level allows for logging INFO. + # @return [Boolean] true if allows + def info? + @parent.info? + end + + # Whether the current severity level allows for logging WARN. + # @return [Boolean] true if allows + def warn? + @parent.warn? + end + + # Whether the current severity level allows for logging ERROR. + # @return [Boolean] true if allows + def error? + @parent.error? + end + + # Whether the current severity level allows for logging FATAL. + # @return [Boolean] true if allows + def fatal? + @parent.fatal? + 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