This is the documentation for the 20.02 version. Looking for the documentation of the latest version? Have a look here.
DHCP logging is configured in
config-kea-dhcp4-log mode. To enter this mode,
config-kea-dhcp4 mode and issue the
<logger-name> parameter must be one of these names:
Default DHCPv4 logging behavior, used when no settings exist for a specific logger.
DHCPv4 lease allocation events.
DHCPv4 packets that are dropped or rejected.
DHCPv4 hook point callout registration/execution.
DHCPv4 commands received over the command channel.
DHCPv4 client FQDN and Hostname option processing.
DHCPv4 server basic operations.
DHCPv4 libkea-dhcpsrv library default logging.
DHCPv4 client classification expression evaluation.
DHCPv4 hook registration/deregistration.
DHCPv4 host reservation management.
DHCPv4 lease allocation.
DHCPv4 option processing/parsing/encoding.
DHCPv4 packet reception/transmission.
DHCPv4 libdhcp_stat_cmds library default logging.
tnsr(config-kea-dhcp4)# logging kea-dhcp4 tnsr(config-kea-dhcp4-log)#
See the Kea documentation for Logging. for a list of values and their meanings.
DHCP Logging Options¶
config-kea-dhcp4-log mode contains the following commands:
- debug-level <level>
The amount of debug information to log, when a log message is classified using the
debugseverity level. From
0(lowest detail) to
- output <location>
Sets the log output location and enters
config-kea-dhcp4-log-outmode to further configure behavior for the given location. The
<location>must be one of:
Log messages to standard output.
Log messages to standard error.
Log messages to syslog using the daemon name.
Log messages to syslog using the given
The full path and filename in which to log messages.
- severity (debug|error|fatal|info|warn)
The severity level of messages to write in the log:
Errors severe enough to cause the daemon to exit.
Errors which are notable but otherwise do not prevent the daemon from functioning.
Unusual conditions which are not normal but also not causing problems.
General noteworthy events and other similar messages.
Debugging messages, which are highly informative but also verbose. The amount of debugging information can be further controlled by the
DHCP Log Output¶
output <location> command from
config-kea-dhcp4-log mode enters
config-kea-dhcp4-log-out mode, which contains the following commands:
- flush (false|true)
Flush the log buffer after writing each line. Lowers performance but ensures that every log message is written completely. This can help in cases where the daemon dies before the log buffer is emptied.
- maxsize <size>
When logging to a file, this option controls the maximum size of the log file before it is rotated. Default value is
- maxver <rotate>
When logging to a file and rotation is enabled, this command controls how many previous log files are retained when performing log rotation. The default value is
1, which is also the minimum allowed value.
If the value of
maxsize is greater than
204800, the daemon will perform
log rotation when the size of the log file exceeds
maxsize. When rotating
logs, the current log will be renamed to
already exists, it will be renamed to
<filename>.2, and so on until the
number of log files reaches the value of
maxver. Older log files beyond the
limit set by
maxver are removed.