How to keep production.log size within reason?

Discussion in 'General' started by Dauntless, Nov 10, 2008.

  1. Dauntless

    Dauntless New Member

    I had observed I had a HUGE production.log in Rails and was told by my hosting provider to include this statement in the /environments/production.rb file;

    config.logger = Logger.new("#{RAILS_ROOT}/log/production.log", 'weekly')

    To my dismay I went in yesterday to 'Show Off' to a friend how neat my websites looked and there were '500 Server' errors on almost every page. Sometimes they'd come up, however?
    I went to my Litespeed console and observed in log screen that there was some error (sorry I didn't write it down) that referred to the production.log?
    Anyway, I simply deleted the above line and now it works fine.
    How would you propose I keep my production.log trimmed down?
    Thank you,
    David Kennedy
  2. mistwang

    mistwang LiteSpeed Staff

    prodcution.log is a rails log file, not controlled by LSWS. LSWS log files will be rotated automatically.
    You may need to create a cron job to archive or truncate it.

Share This Page