Fix logging with WARN, INFO, DEBUG level
This commit is contained in:
parent
40661830a4
commit
ff6d6cce22
@ -8,9 +8,9 @@ class Logger < ::Logger
|
|||||||
end
|
end
|
||||||
|
|
||||||
def add(severity, *args, &block)
|
def add(severity, *args, &block)
|
||||||
|
super
|
||||||
return unless [Logger::FATAL, Logger::ERROR].include?(severity)
|
return unless [Logger::FATAL, Logger::ERROR].include?(severity)
|
||||||
@counters[severity] ||= block ? block.call : args.first
|
@counters[severity] ||= block ? block.call : args.first
|
||||||
super
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def had_logged?(severity)
|
def had_logged?(severity)
|
||||||
|
Reference in New Issue
Block a user