From owner-freebsd-questions@FreeBSD.ORG Fri Mar 19 05:13:10 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 37E8F16A4CE for ; Fri, 19 Mar 2004 05:13:10 -0800 (PST) Received: from mxfep01.bredband.com (mxfep01.bredband.com [195.54.107.70]) by mx1.FreeBSD.org (Postfix) with ESMTP id CC2CE43D1D for ; Fri, 19 Mar 2004 05:13:08 -0800 (PST) (envelope-from dion@bredband.net) Received: from Hecate.my.hell ([213.113.217.172] [213.113.217.172]) by mxfep01.bredband.com with SMTP id <20040319131307.CAQA2708.mxfep01.bredband.com@Hecate.my.hell>; Fri, 19 Mar 2004 14:13:07 +0100 Date: Fri, 19 Mar 2004 14:14:08 +0100 From: Peder Blom To: Supote Leelasupphakorn Message-Id: <20040319141408.3c653517.dion@bredband.net> In-Reply-To: <20040319081859.73821.qmail@web40610.mail.yahoo.com> References: <20040319081859.73821.qmail@web40610.mail.yahoo.com> X-Mailer: Sylpheed version 0.9.10 (GTK+ 1.2.10; i386-portbld-freebsd4.9) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit cc: freebsd-questions@freebsd.org Subject: Re: why can't I implement syslog ? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2004 13:13:10 -0000 On Fri, 19 Mar 2004 08:18:59 +0000 (GMT) Supote Leelasupphakorn 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.