dave at cheney.net
Tue Oct 16 19:07:40 MSD 2007
We use the following script to roll our nginx logs at midnight, we've
found it very reliable
LOG_FILES="access.log error.log images.log redirect.log ssl.log"
# make path
mkdir -p $NGINX_LOG_ROOT/$DATE
# touch and symlink in new log files
for FILE in $LOG_FILES; do
ln -fs $LOG_FILE $NGINX_LOG_ROOT/$FILE
# tell nginx to re-open its log files
kill -USR1 `cat /var/run/nginx.pid`
On 17/10/2007, at 12:50 AM, Igor Sysoev wrote:
> On Tue, Oct 16, 2007 at 01:26:31PM +0200, Bart?omiej Syryjczyk wrote:
>> Is it possible to send logs to some program instead of file?
>> (http://wiki.codemongers.com/NginxHttpLogModule#access_log) show only
>> one way (file).
>> Now we use 'access_log /dev/stdout' in configuration and run
>> nginx via
>> 'nginx | program' - but it is not elegant.
> No, nginx does not support logging to pipe or syslog because of
> issues. Workarounds are /dev/stdout and mkfifo (but they are slow).
> Igor Sysoev
More information about the nginx