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?
问问题
167 次
1 回答
0
使用这个 gem multi_level_logger
将以下内容添加到您的config/environments/production.rb
config.logger = MultiLevelLogger::MLogger.create(:all=>true)
现在您的日志将被写入单独的文件中。您的默认记录器将被禁用。
欲了解更多信息,请查看此处
于 2014-06-03T14:12:46.843 回答