Closed aserafin closed 8 years ago
Maybe just add a if
like that could solve the problem in LoggerReporter#initialize
:
@logger.formatter = formatter || GrapeLogging::Formatters::Default.new if @logger.respond_to?(:formatter)
Exactly my thinking :) 15.03.2016 3:23 PM "Jules Ivanic" notifications@github.com napisał(a):
Maybe just add a if like that could solve the problem in LoggerReporter#initialize :
@logger.formatter = formatter || GrapeLogging::Formatters::Default.new if @logger.respond_to?(:formatter)
— You are receiving this because you were assigned. Reply to this email directly or view it on GitHub: https://github.com/aserafin/grape_logging/issues/23#issuecomment-196843573
I'm not so able to test but I pushed you the modification #24 ;)
Actually it's not @logger.respond_to?(:formatter)
but @logger.respond_to?(:formatter=)
that we should test, I think.
Merged #24 which should solve the issue. Thanks @guizmaii :+1:
There are logger implementations that don't expose `.formatter. Make grape-logging compatible with them!