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

Expose Logger message in Custom Formatter #305

Open
DanCSF opened this issue Nov 5, 2019 · 0 comments
Open

Expose Logger message in Custom Formatter #305

DanCSF opened this issue Nov 5, 2019 · 0 comments

Comments

@DanCSF
Copy link

DanCSF commented Nov 5, 2019

I wan to format the log based on a type parameter sent in the logger.info message.
For example:
Rails.logger.info({type: 'test_log'}), used something similar in a non-lograge setup.

I have build a custom formatter for this, the problem is the actual rails logger message is not included in the custom formatter data parameter, all the info i get there is the one sent from the event in
config.lograge.custom_options = lambda do |event|
since i sent multiple parameters that i wan included in all the logs.

Thank You

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

1 participant