I am using syslog-ng on a Ubuntu Lucid machine with the following upstart script:
# syslog-ng - system logging daemon
#
description "Syslog-ng daemon"
start on (local-filesystems and net-device-up IFACE!=lo)
stop on runlevel [!2345]
expect fork
respawn
pre-start script
test -x /usr/sbin/syslog-ng || { stop; exit 0; }
mkdir -p -m0755 /var/run/syslog-ng
end script
exec /usr/sbin/syslog-ng -p /var/run/syslog-ng/syslog-ng.pid
When the syslog-ng configuration file is wrong, syslog-ng outputs an error message on stderr. Unfortunately, this error is caught by upstart and doesn't get to the console when starting the service, so there is no way to know why the service start failed.
Is it normal that upstart would catch stderr? Can it be set?