Add this line to your application's Gemfile:
gem 'colored_logger'
And then execute:
$ bundle
Or install it yourself as:
$ gem install colored_logger
Add color to any logger output using Rails.logger.<debug|info|warn|error|fatal|unknown> "I am a string".<black|red|green|yellow|blue|magenta|cyan|white>
Right now the colors for the logger severity are hardcoded but I will update soon. As of now they are
{'DEBUG'=>'0;37;45', 'INFO'=>'32', 'WARN'=>'33', 'ERROR'=>'31', 'FATAL'=>'31', 'UNKNOWN'=>'37'}
- Inverse colors/background
- Custom Severities
- Tagged Logs
- Fork it ( http://github.com//colored_logger/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request