Re: Question about squid log

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Fri, 13 Jan 2006 15:21:45 +0100 (CET)

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
Received on Fri Jan 13 2006 - 07:21:49 MST

This archive was generated by hypermail pre-2.1.9 : Fri Jan 27 2006 - 12:00:02 MST