A piped logger is a standalone application that receives access log data sent by web server through a pipe on its STDIN stream. This makes flexible logging possible, like logging into a database or logging to remote server.
Here is a simple piped logger written in Perl, which receives logging data from STDIN and append data received to a file on local harddisk:
open LOG, '>> ../logs/pipedaccess.log';
$| = 1;
print LOG $_;
To use a piped logger, first, you need to define an external application with type “Piped Logger”, then go to “Access Log” configuration and select the “Piped logger” from the drop down list. Once a piped logger is set, access log data will be sending to the logger application instead of the access log file.
You can configure LSWS to use syslog, logging access to syslog.
First, add the following line to your /etc/syslog.conf file:
Then create a logger application with path like this:
/usr/bin/logger -p local0.info
syslogd is pretty slow, it may not be the best solution for a busy server
To log to remote server via syslog, you only need to change the syslog configuration in above example to: