close

The original version of nginx does not support write HTTP access log to pipe. It was not so flexible for managing logs with cronolog or scribe. The author of nginx (Igor Sysoev) said that the feature will not be in any future version of nginx. 

In 2011, The Taobao group in China just released their version of nginx, named Tengine. We take their patch, get the code corresponding to pipe only, and generate a patch file:  from Github

You can clone this Branch to compile, too.

Usage:

access_log "pipe:/usr/local/bin/cronolog /data/logs/access-%Y-%m-%d.log" combined

Attention: if the piped program dead, log will be written to the default log file, not re-open the pipe just as Apache. If you use a unstable logger (e.g. log to network), setting another access log file is recommended to avoid the loss of access log. 

arrow
arrow
    全站熱搜

    PIXNET Lab 發表在 痞客邦 留言(1) 人氣()