Logging improvements
While 1.5.0 is not yet final, may I suggest some logging improvements?
I notice that Knot emits log entries with quotes around some elements, but not others. This makes it more work to parse and process the logs, because I have to strip the quotes during post-processing. Additionally, the stop at the end of most log lines is IMHO unnecessary. Also, not all log lines have it. Would you consider just dropping all final stops?
An example is:
2014-07-08T15:23:22 Zone 'ip6.arpa.' loaded (0 -> 2014061774).
Could you make this just log as:
2014-07-08T15:23:22 Zone ip6.arpa. loaded (0 -> 2014061774)
Next up, the NOTIFY logs look like this:
2014-07-08T15:24:34 NOTIFY of 'ip6.arpa.' with '193.0.0.198@53535': received serial 2014061776.
Could you change them to:
2014-07-08T15:24:34 NOTIFY of ip6.arpa. from 193.0.0.198@53535 with key ripencc-arpa: Received serial 2014061776
This makes it clearer that a signed NOTIFY came in. If the NOTIFY message was not signed, you would leave out the "with key XXXX" part. Or log it as "with key NONE" (so that parsing these log lines can be done with the same regex).
One more logging inconsistency is this:
2014-07-08T15:23:22 [notice] IXFR of 'in-addr.arpa.' with '193.0.0.198@53': Fallback to AXFR.
This should probably be:
2014-07-08T15:23:22 [notice] IXFR of in-addr.arpa. from 193.0.0.198@53: Fallback to AXFR
Next, I like that Knot logs the size of an AXFR, but I don't like that fact that it is rounded up. Instead of logging:
2014-07-08T15:23:22 Incoming AXFR of 'ip6.arpa.' from '193.0.0.198@53': Finished in 0.00s (1 messages, ~32.0 KiB).
could you please log it as:
2014-07-08T15:23:22 Incoming AXFR of ip6.arpa. from 193.0.0.198@53: Finished in 0.00s (1 messages, 32000 bytes)
Finally, the case of log entries is not consistent. Compare the following 2 lines:
2014-07-08T15:23:22 Refresh of 'ip6-servers.arpa.' from '193.0.0.198@53': master has newer serial 2014052294 -> 2014052295.
2014-07-08T15:23:22 Refresh of 'in-addr-servers.arpa.' from '193.0.0.198@53': Zone is up-to-date.
In the first line, the message after the colon starts with 'master', ie. lowercase 'm'. In the next log entry, the message after the colon starts with 'Zone', ie. uppercase 'Z'. IMHO, case is totally unnecessary with logging, and if you log everything with just lowercase, and dispense with stops, then it is much easier to maintain consistency. After all, logs are not prose, and should be easy to parse with scripts, so consistency would help.