Item12712: Foswiki loggers should obtain file lock before writing
Current State: Closed
Released In: 2.0.0
Target Release: major
It's possible that log records can get lost if multiple threads try to log at the same time.
This could possibly slow things down a bit due to contention on the logfile. LogDispatch
provides a solution by optionally incorporating the pid into the logfile name, at the expense of loosing the eachEventSince() function.
- 07 Jan 2014
The outstanding issue here is probably the PlainFile
log rotation code, which makes no attempt to lock while doing the log rotation. I tried to rewrite it a couple of different ways, and ran into issues. One issue is that the unit tests have issues with how they create logfiles for eachEvent merge testing..
One other thing to check: There are comments in Store that flock is not portable, however the notes in perlport states:
Not implemented (VMS, RISC OS, VOS).
I'd be really surprised if any web server is running on these old OS implementation.
- 17 Jun 2014