Logging question

Glenn Satchell Glenn.Satchell at uniq.com.au
Mon Oct 9 13:39:19 UTC 2006


>Subject: Logging question
>Date: Mon, 9 Oct 2006 14:28:27 +0200
>From: "Lars Jacobsen" <lj at sydfynsel.dk>
>To: <dhcp-users at isc.org>
>
>Is there a way to log events regarding a specific pool to a specific
>file, instead of all logging goes to one big log file (syslog/dhcpd.log)
>?
>
>I would like all events from 
>pool "one" into file "one.log"
>pool "two" into file "two.log".
>.
>etc
>
>Thinking of having the log statement inside the pool declaration should
>do the job ?

dhcpd uses syslog to do the logging, so you need to be able to convince
syslog to work in the way you want.

I can think of two possibilities (both untested by me) :

1. use a log-facility statement inside each pool to specify a different
syslog destination. Typically you would use local0 through local7. You
will also need the appropriate log statement to actuially log the
information. A quick read of the dhcpd.conf man page suggests that this
might not work, since it doesn't start using the new syslog setting
until it has parsed the whole dhcpd.conf file. Also you are limited to
how many syslog facilities you can use.

2. this one depends on your syslog operation. If you can convince
syslog to use a different file for each priority within a given
facility then you could specify a different priority in each log
statement. Most syslogs however, mean that a given priority includes
all priorities that are higher as well, so this may not work exactly as
you think.

regards,
-glenn
--
Glenn Satchell     mailto:glenn.satchell at uniq.com.au | Some days we are
Uniq Advances Pty Ltd         http://www.uniq.com.au | the flies;  some
PO Box 70 Paddington NSW Australia 2021              | days we  are the
tel:0409-458-580  tel:02-9380-6360  fax:02-9380-6416 | windscreens...


More information about the dhcp-users mailing list