Kea disables logging if configured without an `output-options`
To replicate, start a kea-dhcp6
with a configuration that has the loggers
entry for the general logger kea-dhcp6
that does not have an output-options
entry.
{
"Dhcp6": {
"loggers": [
{
"name": "kea-dhcp6",
"severity": "INFO"
}
]
}
}
Or set the same configuration through unix socket or kea-ctrl-agent (maybe while still preserving the control-socket, that's why it's there):
{
"arguments": {
"Dhcp6": {
"control-socket": {
"socket-name": "/tmp/kea-dhcp6-ctrl.sock",
"socket-type": "unix"
},
"loggers": [
{
"name": "kea-dhcp6",
"severity": "INFO"
}
]
}
},
"command": "config-set",
"service": [
"dhcp6"
]
}
You get this and no more logging after that.
log4cplus:ERROR No appenders could be found for logger (kea-dhcp6.hosts).
log4cplus:ERROR Please initialize the log4cplus system properly.
This contradicts the ARM which says:
Each logger can have zero or more
output-options
.
It replicates with subloggers too. Only the sublogger is affected in that case.
You can have interfaces-config
and subnet6
and anything else besides it.
DHCP traffic works. Commands work. Logging does not.
It also replicates on kea-dhcp4
.
There is the workaround of reconfiguring with output-options
. Logging recovers after that.
Also found a typo in the ARM: output_commands
should be output-options
.
Suggested actions:
-
Make logging work when output-options
is not configured with the documented default ofstdout
as output option. -
Fix the typo in the ARM: output_commands
should beoutput-options
.