Discussion:
dhcpd.conf logging statement documentation
Vasiliy Molostov
2012-03-26 16:51:25 UTC
Permalink
Hi!

Please help locate documentation reference for a 'logging' statement used as
example on dhcpd.conf(5) man page, with exact syntax and structure reference
on this subj.

googling gave nothing, and I have found nothing related to 'logging' in isc
site docs and in source distrubution release docs .

The question is simply refers to reduce usual (default) logging verbosity from
dhcpd, but I have found only examples on how to use syslog config instead of
configuring dhcpd.conf, while I need to configure mainly dhcpd.conf logging
options ...

Any link on this subj would be fine...

Thanks
perl-list
2012-03-26 17:56:23 UTC
Permalink
To my knowledge, you cannot reduce logging verbosity inside dhcpd itself. You can only change what is logged via syslog working with log levels.

For example:

in dhcpd.conf:
log-facility local6;

in syslog.conf:
local6.error -/var/log/dhcpd-error.log
local6.* -/dev/null

or similar ... please note that I have not tested the syslog statements and that they may require some modification to actually work...

----- Original Message -----
Sent: Monday, March 26, 2012 12:51:25 PM
Subject: dhcpd.conf logging statement documentation
Hi!
Please help locate documentation reference for a 'logging' statement
used as
example on dhcpd.conf(5) man page, with exact syntax and structure
reference
on this subj.
googling gave nothing, and I have found nothing related to 'logging'
in isc
site docs and in source distrubution release docs .
The question is simply refers to reduce usual (default) logging
verbosity from
dhcpd, but I have found only examples on how to use syslog config
instead of
configuring dhcpd.conf, while I need to configure mainly dhcpd.conf
logging
options ...
Any link on this subj would be fine...
Thanks
_______________________________________________
dhcp-users mailing list
https://lists.isc.org/mailman/listinfo/dhcp-users
Vasiliy Molostov
2012-03-27 10:22:36 UTC
Permalink
man page states for logging statement with the following example:

logging {
channel update_debug {
file "/var/log/update-debug.log";
severity debug 3;
print-category yes;
print-severity yes;
print-time yes;
};
channel security_info {
file "/var/log/named-auth.info";
severity info;
print-category yes;
print-severity yes;
print-time yes;
};

category update { update_debug; };
category security { security_info; };
};

as you can see there is severity can be defined.
before digging sources for understanding its syntax I would ask community -
perhaps there is some document reference for it already....

Please dont offer syslog, since I have stated already that Im not going to
configure it, because I want to configure only dhcpd.conf. Also, please note
that I have asked for a document reference.

On ПМ, 26 Ќар 12 13:56:23 perl-list wrote:

To my knowledge, you cannot reduce logging verbosity inside dhcpd itself. You
can only change what is logged via syslog working with log levels.


For example:


in dhcpd.conf:
log-facility local6;


in syslog.conf:
local6.error -/var/log/dhcpd-error.log
local6.* -/dev/null


or similar ... please note that I have not tested the syslog statements and
that they may require some modification to actually work...





From: "Vasiliy Molostov" <***@gmail.com>
To: dhcp-***@lists.isc.org
Sent: Monday, March 26, 2012 12:51:25 PM
Subject: dhcpd.conf logging statement documentation

Hi!

Please help locate documentation reference for a 'logging' statement used as
example on dhcpd.conf(5) man page, with exact syntax and structure reference
on this subj.

googling gave nothing, and I have found nothing related to 'logging' in isc
site docs and in source distrubution release docs .

The question is simply refers to reduce usual (default) logging verbosity from
dhcpd, but I have found only examples on how to use syslog config instead of
configuring dhcpd.conf, while I need to configure mainly dhcpd.conf logging
options ...

Any link on this subj would be fine...

Thanks
Gerald Vogt
2012-03-27 10:41:12 UTC
Permalink
Post by Vasiliy Molostov
logging {
channel update_debug {
file "/var/log/update-debug.log";
severity debug 3;
print-category yes;
print-severity yes;
print-time yes;
};
That's an example for logging in bind not dhcpd.
Post by Vasiliy Molostov
Please dont offer syslog, since I have stated already that Im not going to configure it, because I want to configure only dhcpd.conf. Also, please note that I have asked for a document reference.
dhcpd only logs to syslog unless you start it with option "-d". With
"-d" it will log everything to stderr.

You can't change it in with dhcpd.conf. The standard daemon will only
log to syslog.

You can get more debugging messages if you define some DEBUG symbols
during compilation. See the source code for details.

Gerald
Glenn Satchell
2012-03-27 12:18:27 UTC
Permalink
dhcpd cannot log directly to a file using commands in dhcpd.conf, it only
logs via syslog.

Perhaps capturing the stderr stream might work for you. This is from the
dhcpd man page:

-d Send log messages to the standard error descriptor.
This can be useful for debugging, and also at sites
where a complete log of all dhcp activity must be kept
but syslogd is not reliable or otherwise cannot be
used. Normally, dhcpd will log all output using the
syslog(3) function with the log facility set to
LOG_DAEMON. Note that -d implies -f (the daemon will
not fork itself into the background).

Usage would be something like

dhcpd -d 2> file.log

The logging example below is in the section on DNS updates, and is for
configuring logging for the BIND dns server, not dhcpd. The documentation
is in the BIND Administrator's Reference Manual, select the version on
this page http://www.isc.org/software/bind/documentation

In the man page the sentence immediately preceding the example is:

You may wish to enable logging of DNS updates on your DNS
server. To do so, you might write a logging statement like
the following:

regards,
-glenn
Post by Vasiliy Molostov
logging {
channel update_debug {
file "/var/log/update-debug.log";
severity debug 3;
print-category yes;
print-severity yes;
print-time yes;
};
channel security_info {
file "/var/log/named-auth.info";
severity info;
print-category yes;
print-severity yes;
print-time yes;
};
category update { update_debug; };
category security { security_info; };
};
as you can see there is severity can be defined.
before digging sources for understanding its syntax I would ask community -
perhaps there is some document reference for it already....
Please dont offer syslog, since I have stated already that Im not going to
configure it, because I want to configure only dhcpd.conf. Also, please note
that I have asked for a document reference.
To my knowledge, you cannot reduce logging verbosity inside dhcpd itself.
You
can only change what is logged via syslog working with log levels.
log-facility local6;
local6.error -/var/log/dhcpd-error.log
local6.* -/dev/null
or similar ... please note that I have not tested the syslog statements and
that they may require some modification to actually work...
Sent: Monday, March 26, 2012 12:51:25 PM
Subject: dhcpd.conf logging statement documentation
Hi!
Please help locate documentation reference for a 'logging' statement used as
example on dhcpd.conf(5) man page, with exact syntax and structure reference
on this subj.
googling gave nothing, and I have found nothing related to 'logging' in isc
site docs and in source distrubution release docs .
The question is simply refers to reduce usual (default) logging verbosity from
dhcpd, but I have found only examples on how to use syslog config instead of
configuring dhcpd.conf, while I need to configure mainly dhcpd.conf logging
options ...
Any link on this subj would be fine...
Thanks
_______________________________________________
dhcp-users mailing list
https://lists.isc.org/mailman/listinfo/dhcp-users
_______________________________________________
dhcp-users mailing list
https://lists.isc.org/mailman/listinfo/dhcp-users
Glenn Satchell
2012-03-27 11:12:21 UTC
Permalink
from the dhcp-eval man page:

log (priority, data-expr)

Logging statements may be used to send information to the
standard logging channels. A logging statement includes
an optional priority (fatal, error, info, or debug), and a
data expression.

Logging statements take only a single data expression
argument, so if you want to output multiple data values,
you will need to use the concat operator to concatenate
them.

This needs to be used in conjunction with the log-facility command
(dhcpd.conf man page) and /etc/syslog.conf (may be rsyslog.conf or similar
depending on what your linux distr4o provides).

So, in the syslog.conf you can define different destination files for the
different log levels.

As an example from one of my systems, I have this in dhcpd.conf:

log-facility local7;

and this is from my syslog.conf:

*.debug,local6.none,local7.none /var/log/syslog
# DHCP
local7.debug /var/log/dhcp/dhcpd.log

To reduce the volume of logging, adjust the level parameter used with
local7 - debug means log everything, the levels of reducing volume are:
debug, info, notice, warn, err, crit, alert, emerg, none.

You'll need to experiment or look atthe source to see what level various
messages are logged at. For a busy site you'll probably want to go to warn
or err perhaps.

HTH.

regards,
-glenn
Post by Vasiliy Molostov
Hi!
Please help locate documentation reference for a 'logging' statement used as
example on dhcpd.conf(5) man page, with exact syntax and structure reference
on this subj.
googling gave nothing, and I have found nothing related to 'logging' in isc
site docs and in source distrubution release docs .
The question is simply refers to reduce usual (default) logging verbosity from
dhcpd, but I have found only examples on how to use syslog config instead of
configuring dhcpd.conf, while I need to configure mainly dhcpd.conf logging
options ...
Any link on this subj would be fine...
Thanks_______________________________________________
dhcp-users mailing list
https://lists.isc.org/mailman/listinfo/dhcp-users
Loading...