I'm logging iTerm2 session input to a local folder with the following naming convention:
\(autoLogId).log
I'm trying to rotate these logs with a newsyslog config that looks like:
~/Code/iterm/logs/*.log user:staff 666 20 4000 * GJ
Which says to rotate the logs in that folder when they reach 4MB or larger and keep 20 archives.
When the files are rotated, iTerm no longer appends to the log file. I suspect this is because iTerm2 is still logging to the old file descriptor.
Is this because I need to indicate a PID for newsyslog to notify? Alternately, is there another/better approach?