Why doesn't this work?
markham_breitbach at ssimicro.com
Thu Jun 27 17:02:29 UTC 2013
logger logs to syslog, so unless you have user.notice logging to /var/log/testing.log this
will probably not do what you are expecting. Have a look in /var/log/messages for
something like this.
Jun 27 16:38:03 xxx-hostname base_http_access: /var/log/testing.log
Otherwise, you may want to setup /etc/syslog.conf to log one of the local facilities to
/var/log/testing.log with something like this:
you will need to touch /var/log/testing.log and restart syslog, then change your script to
something like this:
echo "Testing, testing, testing" |/usr/bin/tee -a /var/log/httpd-access.log
|/usr/bin/logger -t base_http_access -p local6.info
Don't forget to update newsyslog.conf to rotate your new testing.log
On 13-06-27 10:29 AM, Paul Schmehl wrote:
> echo "Testing, testing, testing" |/usr/bin/tee -a /var/log/httpd-access.log
> |/usr/bin/logger -t base_http_access /var/log/testing.log
> This writes to the httpd-access.log but does not write to /var/log/testing.log. I'm
> probably reading the man page incorrectly, but I thought this should work. For some
> reason absolutely nothing is being passed from tee to logger.
> What am I missing?
More information about the freebsd-questions