kostya / eye

Process monitoring tool. Inspired from Bluepill and God.
MIT License
1.19k stars 89 forks source link

How to make sure log files are rotated or don't grow #226

Closed rept closed 5 years ago

rept commented 5 years ago

I've changed this:

logger '/production/current/log/eye.log'

into

logger '/production/current/log/eye.log', 7, 5.megabytes

But this doesn't affect the daemonized processes right?

I have a process:

process :sneakers do
    daemonize true
    pid_file "/production/current/tmp/pids/sneakers.pid"
    stdall "/production/current/log/sneakers.log"

    start_command "bundle exec rake sneakers:run"
    stop_signals [:TERM, 5.seconds, :KILL]
    restart_command 'kill -9 {PID}'

    restart_grace 10.seconds
  end
end

How can I make sure the sneakers.log never grows beyond XX MB ?

kostya commented 5 years ago

use eye-rotate gem