You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was able to reproduce this on Rails 6.1.7 with Ruby 2.5.8. and Rails 6.1.7 with Ruby 2.6.6 too. If I add the appender using config.semantic_logger.add_appender as indicated above in application.rb or environments/<environment>.rb (as suggested by the documentation, if I understand correctly), the appender formatter gets clobbered somehow. If, instead, I add it using SemanticLogger.add_appender(file_name: "log/#{Rails.env}.json", formatter: :json) in an initializer, it seems to work as expected.
Any thoughts why that's happening, and does it make sense to leave it like I have it now?
Environment
config.semantic_logger.add_appender(file_name: "log/#{Rails.env}.json", formatter: :json)
in
development.rb
Expected Behavior
A log/development.json file with json-formatted output
Actual Behavior
The log/development.json file appears and gets content, but it's the default color formatter, not json. What could I be doing wrong?
Thank you!
The text was updated successfully, but these errors were encountered: