Rails logger format string configuration

后端 未结 4 1435
余生分开走
余生分开走 2020-12-01 08:36

How can I configure the rails logger to output its log strings in another format? I would like to get something that is more informative like:

[Log Level] [Time] [Me

4条回答
  •  春和景丽
    2020-12-01 09:01

    For rails 4 apps, I've put together a simple gem that not only adds support for basic tagging like time stamp and log level, but even adds color to the log messages themselves.

    https://github.com/phallguy/shog

提交回复
热议问题