From owner-freebsd-questions@FreeBSD.ORG Fri Mar 27 09:24:46 2015 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EFBA4809 for ; Fri, 27 Mar 2015 09:24:46 +0000 (UTC) Received: from mail.xtaz.uk (tao.xtaz.uk [IPv6:2001:8b0:202::10]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B22CCFB3 for ; Fri, 27 Mar 2015 09:24:46 +0000 (UTC) Received: by mail.xtaz.uk (Postfix, from userid 1001) id AE698209AF2F; Fri, 27 Mar 2015 09:24:42 +0000 (GMT) Date: Fri, 27 Mar 2015 09:24:42 +0000 From: Matt Smith To: Jim Pazarena Subject: Re: dhcpd logging Message-ID: <20150327092442.GB51823@xtaz.uk> Mail-Followup-To: Matt Smith , Jim Pazarena , freebsd-questions@freebsd.org References: <55144D86.2080105@paz.bz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <55144D86.2080105@paz.bz> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 09:24:47 -0000 On Mar 26 11:18, Jim Pazarena wrote: >I want to place dhcpd log messages in a file rather than the >syslog facility LOG_DAEMON. >So I see that with the command line flag "-d" I can direct messages >to stderr. > >How can I adjust the normal rc.conf to actually TELL the system >the file name? Is there a way? Also, I would want to append to the >file via ">>" rather than clobber it every time I reload dhcpd. > As Ben said in the other reply. Why not just use syslog? I do this in /etc/syslog.conf: At the top of the file above all the other lines: !-dhcpd ... At the bottom of the file below all the other lines: !dhcpd *.* /var/log/dhcpd.log !* This will cause all log lines from dhcpd to go to that file and remove them from all of the other files. And then something like this in /etc/newsyslog.conf: /var/log/dhcpd.log 640 3 * $W6D0 Which will rotate it every week. -- Matt