why can't I implement syslog ?

Peder Blom dion at bredband.net
Fri Mar 19 05:13:10 PST 2004


On Fri, 19 Mar 2004 08:18:59 +0000 (GMT)
Supote Leelasupphakorn <pjn0211 at yahoo.com> wrote:

> Hi all,
> 
>    I would like to log my message by using syslog so I altered
> /etc/syslog.conf like below (kill and re-start syslogd as well)
> 
> # file: /etc/syslog.conf 
> -- snip ---
> 
> local1.debug                /var/log/myScript.log
> 
> 
>   and in a shell script I use 
> 
> # /usr/bin/logger -i -p local1.debug -t myScript "this is a
> testing log message."
> 
> after I run above script nothing  to file:/var/log/myScript.log.
> Why not or
> I miss something ?
> 

You might have a program or hostname specification preceding your line
from syslog.conf. Probably true if you just appended the line to
syslog.conf. This would limit the scope of logging. See man syslog.conf!

The file "myscript.log" must exist before you restart syslogd to re-read
the configuration.



More information about the freebsd-questions mailing list