glenn.satchell at uniq.com.au
Sat Apr 16 00:40:46 UTC 2011
On 04/16/11 08:06, Simon Hobson wrote:
> Matt Causey wrote:
>> man dhcpd.conf:
>> The log-facility statement
>> log-facility facility;
>> This statement causes the DHCP server to do all of its logging on
>> the specified log facility once the dhcpd.conf file has been read.
> That doesn't answer the OPs question - he wants to keep a separate error
> log, I guess in the same way that you get a mail.log and a mail.err.
> Having an error log is quite handy for spotting errors since they aren't
> then buried in the normal stuff.
> It may be possible to use pattern matching in one of the more modern
> syslog replacements, but that would require an advance knowledge of all
> the possible error messages (or at least a common element).
syslog has facility.level type settings. So you could send all dhcp
syslog messages to, say, local0 using "log-facility local0;" in dhcpd.conf.
Then in syslog.conf you can split these into the different levels.
Usually level is specified as '*' meaning all levels. The original and
still valid notation is to use the the level name and that means "that
level and all higher ones". On my system the recognised levels are
listed below, check your syslog.conf man page though.
Recognized values for level are (in descending order of
emerg For panic conditions that would normally be
broadcast to all users.
alert For conditions that should be corrected
immediately, such as a corrupted system
crit For warnings about critical conditions, such
as hard device errors.
err For other errors.
warning For warning messages.
notice For conditions that are not error condi-
tions, but may require special handling. A
configuration entry with a level value of
notice must appear on a separate line.
info Informational messages.
debug For messages that are normally used only
when debugging a program.
none Do not send messages from the indicated
facility to the selected file. For example,
a selector of
So an entry in syslog.conf such as
will get all the messages with err, crit, alert and emerg levels. The
level is configured in the dhcpd code and is not easily changed, but
hopefully is logged at a meaningful level.
Would get everything from info level and up, including all the err, crit
and so on.
Glenn Satchell | Miss 9: What do you
Uniq Advances Pty Ltd, Sydney Australia | do at work Dad?
mailto:glenn.satchell at uniq.com.au | Miss 6: He just
http://www.uniq.com.au tel:0409-458-580 | types random stuff.
More information about the dhcp-users