Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make formatter optional #23

Closed
aserafin opened this issue Mar 15, 2016 · 5 comments
Closed

Make formatter optional #23

aserafin opened this issue Mar 15, 2016 · 5 comments
Assignees

Comments

@aserafin
Copy link
Owner

There are logger implementations that don't expose `.formatter. Make grape-logging compatible with them!

@aserafin aserafin self-assigned this Mar 15, 2016
@guizmaii
Copy link
Contributor

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)

@aserafin
Copy link
Owner Author

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:
#23 (comment)

@guizmaii
Copy link
Contributor

I'm not so able to test but I pushed you the modification #24 ;)

@guizmaii
Copy link
Contributor

Actually it's not @logger.respond_to?(:formatter) but @logger.respond_to?(:formatter=) that we should test, I think.

@aserafin
Copy link
Owner Author

Merged #24 which should solve the issue. Thanks @guizmaii 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants