-
Notifications
You must be signed in to change notification settings - Fork 18
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
Improved logging class #30
Conversation
iloveitaly
commented
May 19, 2016
•
edited
Loading
edited
- switched to extending a gem
- translation expansion is related to Persistence #19
@AlessioRocco Any thoughts on this PR? I have some other changes I'd like to submit a PR for that are dependent on this change |
@iloveitaly I think we might need some time to analyze the requirements here... One thing we don't want is to depend on another external gem which doesn't seem widely supported. I think we should look for other "more robust" gems o just go with a logging class inside Cangaroo. |
@mtylty Agreed! I don't like relying on external gems either. I created I think Cangaroo:
What do you think? |
@mtylty Friendly ping on this; any thoughts on my above comments? |
2835cc0
to
e39342c
Compare
connection: job.class.connection | ||
}) | ||
end | ||
def expand(attributes) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent indentation detected.
e39342c
to
b56d6d0
Compare
@iloveitaly Hi, I like the idea of structured logging but I don't want force the end user to use the The logger class https://github.com/iloveitaly/cangaroo/blob/b56d6d07b03fec830d9a1ad8dd6f76589d07241c/lib/cangaroo/logger.rb seems to much coupled with |
@iloveitaly I did this PR #44, it's is currently in WIP but it's a starting point to talk about my previous comment but with with some code, I've added a configuration option https://github.com/nebulab/cangaroo/pull/44/files#diff-8de3b2a85ababa7651c32ebc03dee14fR17 to change the logger to use. I'm currently thinking a way to normalize how the logs works, for now I did this cangaroo/lib/cangaroo/logger.rb Lines 9 to 16 in 807a54a
Rails.logger doesn't accept more than 1 param, instead gems like yours simple_structured_logger and semantic_logger accepts two params... let me know what are your thoughts.
|
@AlessioRocco I like this approach! Allows users to use their favorite structured logging class with a sane + simple fallback. Catching |
@iloveitaly I use I close this PR in favor of #44 |
@AlessioRocco Makes sense, that works for me! |