Ich versuche, alle meine Apache-Protokolle an syslog-ng (auf einem entfernten Rechner) zu senden, das wiederum in eine Datei schreibt.
Ich konfiguriere syslog-ng also folgendermaßen
source s_apache {
unix-stream("/var/log/apache_log.socket" max-connections(512) keep-alive(yes));
};
filter f_apache { match("error"); };
destination df_custom { file("/var/log/custom.log"); };
log {
source(s_apache);
filter(f_apache);
destination(df_custom);
};
und fügen Sie die folgende Zeile in apache2.conf ein
ErrorLog "|/usr/bin/logger -t 'apache' -u /var/log/apache_log.socket"
aber nur die Protokolle, die in "/var/log/custom.log" geschrieben werden, sind
[Mon Jul 13 17:24:36 2009] [notice] caught SIGTERM, shutting down
y
[Mon Jul 13 17:26:11 2009] [notice] Apache/2.2.11 (Ubuntu) configured -- resuming normal operations
Ich möchte, dass alle Protokolle an custom.log..... gesendet werden. Bitte helfen Sie mir.... wo mache ich etwas falsch?