monolog icon indicating copy to clipboard operation
monolog copied to clipboard

Add handling of inode changes to reopen files in StreamHandler

Open cesargb opened this issue 7 months ago • 0 comments

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.

cesargb avatar Apr 12 '25 11:04 cesargb