I'm attempting to send my apache logs to syslog-ng(on remote machine) which creates to some file.

and so i configure syslog-ng by doing this

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);
};

and add the next line to apache2.conf

ErrorLog "|/usr/bin/logger -t 'apache'  -u /var/log/apache_log.socket"

only logs being written to "/var/log/custom.log" are

[Mon Jul 13 17:24:36 2009] [notice] caught SIGTERM, shutting down

and

[Mon Jul 13 17:26:11 2009] [notice] Apache/2.2.11 (Ubuntu) configured -- resuming normal operations

I would like all logs to be delivered to custom.log..... Help me.... where shall we be held failing?

I'm able to suggest for you this link: http://httpd.apache.org/docs/2.2/logs.html Here you can study about login apache. If you would like all login syslog-ng, you have to configure also access logs with CustomLog directive.

Regards, Lorenzo.

I'd exactly the same problem, and that i discovered that the the ErrorLog and CustomLog configurations were getting overwritten by /etc/apache2/sites-available/default

After leaving comments out individuals, it labored !

Or just put these configurations in < virtualhost > if you wish to log only specific domain calls

Regards rane