0

I want to log warn messages to a file like warn.log, error messages to a file like error.log. I've googled so many pages and also the StackOverFlow, but I didn't find some parallel topics. Do you have any good suggestions?

Bhargav Rao
  • 50,140
  • 28
  • 121
  • 140
hiveer
  • 660
  • 7
  • 17

1 Answers1

0

Use this gem multi_level_logger

Add the following in your config/environments/production.rb

config.logger =  MultiLevelLogger::MLogger.create(:all=>true)

Now your logs will be written into separate files. And your default logger will be disabled.

For more info check here

Siva
  • 7,780
  • 6
  • 47
  • 54