ensure silence method exists
This commit is contained in:
parent
0b5075a741
commit
22b767853d
@ -20,9 +20,13 @@ if Rails.env.development? || Rails.env.test?
|
|||||||
|
|
||||||
eval <<-METHOD
|
eval <<-METHOD
|
||||||
def #{m1}_with_silencer#{m2}(*args)
|
def #{m1}_with_silencer#{m2}(*args)
|
||||||
|
if @logger.respond_to?(:silence)
|
||||||
@logger.silence do
|
@logger.silence do
|
||||||
#{m1}_without_silencer#{m2}(*args)
|
#{m1}_without_silencer#{m2}(*args)
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
#{m1}_without_silencer#{m2}(*args)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
METHOD
|
METHOD
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user