The levels available on the logger are (in ascending order): debug, info, warn, error, and fatal.
The production environment logs at the info level and higher by default. This means that for every request received, messages will be written to the log about the request.
As your traffic increases, the amount of log data can become overwhelming and in some cases, writing the log to disk will begin to impact your server performance.
You can choose to log only at the warn level and higher. To do this, add a line to your environments/production.rb:
config.log_level = :warn
Your log file size will be significantly reduced, with the tradeoff being less visibility into your application server's operation.
More details: http://maintainable.com/articles/rails_logging_tips#reducing-log-file-size
If you find this useful, would you like to buy me a drink? No matter more or less, it will be an encouragement for me to go further. Thanks in advance!! =)
No comments:
Post a Comment