On Fri, 13 Jan 2006, Nikolay Pelov wrote:
Is it possible to read incomplete line from log file. is log file line buffered?
The log file is written one line at a time. But it is possible the line is very long and will be written out in several segments.. but for access.log this should only happen if you have enabled log_mime_hdrs.
In any case it is easy for your application to detect when this happens. If the file does not end in \n then the last record is not yet complete, and you should only process data up to the last \n found, continuing on the next char after that in the next round.
Regards Henrik
