[Kea-users] Different logging time in dhcp4 log and ctrl-agent log

Stephen Morris stephen at isc.org
Thu Jun 4 11:51:00 UTC 2020


On 04/06/2020 07:58, Marcin Romanowski wrote:
> Hello,
> 
> Any idea why this happens?
> I notice that when I enabled ha in hooks logger I have also decreased 2h
> time. Only kea-ctrl-agent presents system's time.
> This issue I have on 3 different systems (debian 9, debian 10 and ubuntu
> 18) and tried on kea 1.6.2 and 1.7.8 with the same issue.

In your previous post, you gave the pattern used for logging:

> "pattern": "%d{%y.%m.%d %H:%M:%S.%q} %-5p [%c/%i] %m\n"

Kea logging is built on log4cplus, and the pattern specification is the
one used by that package.  The log4cplus manual at:

https://log4cplus.sourceforge.io/docs/html/classlog4cplus_1_1PatternLayout.html

says that "%d{...}" outputs the time in UTC.

The web site associated with your email domain (nicram.net) is in
Polish. Poland is currently on CEST, two hours ahead of UTC.  This would
account for the discrepancy you are seeing.

Try changing your pattern from "%d{...}" to "%D{...}", which will output
the time in local time.

Stephen


More information about the Kea-users mailing list