NLnetLabs / unbound

Unbound is a validating, recursive, and caching DNS resolver.
https://nlnetlabs.nl/unbound
BSD 3-Clause "New" or "Revised" License
3.15k stars 360 forks source link

[FR] log timestamps in ISO8601 format with timezone #1144

Closed pspacek closed 2 months ago

pspacek commented 2 months ago

Current behavior Is there a current behavior that the feature relates to?

Related to log output generated by:

unbound -d

It logs in timestamp format like:

[1727194783] unbound[265379:0] error: bind: address already in use

Describe the desired feature I would like to see standard ISO timestamp format for output, including timezone.

2024-09-24T18:11:29.157+00:00 unbound[265379:0] error: bind: address already in use

Potential use-case

Request in NSD to do the same: https://github.com/NLnetLabs/nsd/issues/383

BTW Knot DNS uses the ISO format already.

wcawijngaards commented 2 months ago

The options log-time-ascii: yes and log-time-iso: yes produce ISO8601 timestamps in the log file. It is an option so that existing parsers keep working, but also can be simplified.

pspacek commented 2 months ago

Thank you very much, this was fast like lightning!