[dev] http_request->connection->log, cycle->log and ending '\n'

Igor Sysoev is at rambler-co.ru
Sun Dec 16 23:36:25 MSK 2007


On Sun, Dec 16, 2007 at 09:21:02PM +0100, Manlio Perillo wrote:

> I have noted a difference in the log output of 
> http_request->connection->log and cycle->log and ending.
> 
> For the former, an ending new line character is ignored, so writing
> "log line" and "log line\n" is equivalent (but extra '\n' are not ignored).
> For the latter, the ending new line character is never ignored.
> 
> 
> What's the cause of this?
> I would like to ignore an ending new line character for cycle->log, too.

There's no difference in ngx_log_error().
Probably, http code clean ending spaces, CR, and LF before ngx_log_error().


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list