roidrage/lograge

Expose Logger message in Custom Formatter

DanCSF opened this issue · 0 comments

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