Rotate files while the service is running.
If AppRotateOnline is set, set up a pipe between the application's
stdout/stderr and a new thread which reads all input and writes to the
configured output file(s).
If a file breaches the configured AppRotateBytes threshold while the
service is running, close and rotate the file then resume logging to
a new file.
This behaviour is not the default due to the potential for things to go
wrong. We have to juggle file handles and might hit a read or write
error which causes logging to fail thus losing all output until the
service is restarted, etc etc.
Thanks Doug Watson.
12 files changed: