monolog
monolog copied to clipboard
Add handling of inode changes to reopen files in StreamHandler
In log rotation processes, I don't always have control to reopen files when they are renamed or deleted. Therefore, if I don't want to truncate the file, I need a mechanism for the process writing to the log to detect that the file has changed.
With this change, before performing a write operation, the process writing to the log checks if the file has changed. If so, it reopens the file and continues writing to it.