Best way to format log messages in Rails 3?

I found this. It seems ugly to just throw it in environment.rb. The question is old. I just wanted to ask if there is a better way to do this now.

The problem (if you do not want to follow the link) includes your message formatting format. (The problem I'm solving is that I want to assign a guid for each request, deliver all the log messages from that request using guid, and then return the guid in metadata to the aka request id client)

Rails log format string configuration

+3
source share
1 answer

You can put it in the initializer .

config/initializers. ; , , , .

+2

Source: https://habr.com/ru/post/1796557/


All Articles