2008/7/9 Cyrus Harmon ch-tbnl@bobobeach.com:
Currently, if a file is setup for logging and some other program modifies the file, subsequent log messages fail with a message like this:
[2008-07-08 16:56:00 [ERROR]] Error while processing connection: I/O timeout reading #<SB-SYS:FD-STREAM for "a socket" {136DDCD1}>.
I don't think that the I/O timeout message is related to reopening the log file - As you can see in the error message, there was an operation on a socket stream, not a file, and as I explained in a previous mail, these timeout messages will be trapped in the future, as they are not indicative of an error.
It would be nice if we trapped this error and reopened the file for appending at this point instead of just timing out. Not sure how involved this is though. Figured I'd record the intention here for posterity's sake in case I never get around to trying to do this.
You need to use the (setf *log-pathname*) and (setf *access-log-pathname*) accessors to force Hunchentoot to reopen the log files. I think there is no portable way to determine if a file has been changed by some other program or to force appending like in Unix' O_APPEND, but I could be wrong. We don't really want to introduce a platform dependency for this, or do we?
-Hans