pear/Log — Issue #2: Log rotating Log_file with locking
Author: jausions
Created: 2011-11-28 09:38:30+00:00
State: open

Truncating the log using Log_file when locking is enabled could lead to lost log events.

The locking mechanism in place currently uses a lock on the log file itself, so truncating the file could cause issues when one process rotates (i.e. renames) the log while some other processes might have opened the log file at the same time but are waiting for the lock to be released.

The lock should be acquired on a dedicated lock file and not on the log file itself.