meza icon indicating copy to clipboard operation
meza copied to clipboard

Rotate Parsoid log file

Open jamesmontalvo3 opened this issue 8 years ago • 1 comments

Currently in Parsoid log files are never rotated, and thus continue to grow with time. A method of log rotation should be developed.

One method would be to create a new log each time the Parsoid service is restarted. In initd_parsoid.sh when the Parsoid log file is setup it always uses the same name:

runuser -l "$USER" -c "nohup $DAEMON $SERVER >> $LOG_FILE 2>&1 &" && parsoid_start_echo_success || echo_failure

source: https://github.com/enterprisemediawiki/meza/blob/master/config/core/initd_parsoid.sh#L43

LOG_FILE is defined as LOG_FILE="$ROOT_DIR/server.js.log", but this could be easily change to include a timestamp. If the timestamped file doesn't exist (which it basically never should) then create the file.

jamesmontalvo3 avatar Nov 08 '16 21:11 jamesmontalvo3

@freephile could you look into this?

jamesmontalvo3 avatar Dec 10 '18 22:12 jamesmontalvo3