in reply to Re^3: How to log all output from a program?
in thread How to log all output from a program?
I don't think so. Usually, the OS provides atomic write operations up to a certain length. If your write operations go over that limit, the way to ensure that data from different processes does not interleave is to lock the file.
Reopening the file on every write allows to rotate the logs from the outside without the current script knowing.
|
|---|