Date: Thu, 27 Jun 2013 10:43:17 -0600 From: markham breitbach <markham_breitbach@ssimicro.com> To: Paul Schmehl <pschmehl_lists@tx.rr.com> Cc: Freebsd Questions <freebsd-questions@freebsd.org> Subject: Re: Why doesn't this work? Message-ID: <51CC6BA5.9040003@ssimicro.com> In-Reply-To: <490C0497718DA8BC80E42A15@localhost> References: <490C0497718DA8BC80E42A15@localhost>
next in thread | previous in thread | raw e-mail | index | archive | help
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: local6.* /var/log/testing.log 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 -Markham 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? >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?51CC6BA5.9040003>