Re: [Pdns-users] structured logging [was: First Alpha Release of PowerDNS Recursor 4.8.0]

2022-09-23 Thread Otto Moerbeek via Pdns-users
On Fri, Sep 23, 2022 at 12:48:06PM +0200, Jan-Piet Mens via Pdns-users wrote:

> > * [1]Structured Logging has been implemented for almost all
> >   subsystems. This allows for improved (automated) analysis of
> >   logging information.
> 
> Is there any further documentation about this other than the link you added 
> and the "Logging" [2] section in the documentation?
> 
> What exactly does "structured" mean? Is this JSON? Are there any examples?
> 
>   -JP
> 
> 
> [2] https://docs.powerdns.com/recursor/running.html#logging

It means the information is deliverd as key-value pairs instead of
free-format strings.  The default bakcend sends this as formatting
strings with proper quoting rules to the existing logging system
(either systemd-journal in text mode or syslog). In that case, it
looks like this:

Sep 23 13:21:50 msg="trying DoT" subsystem="taskq" level="0"
prio="Warning" tid="6" ts="1663932110.773" ip="188.166.104.87:853"
method="tryDoT" name="powerdns.com" qtype="SOA"

This allows alreayd for more robust log line scanning.

When configured, the information can also be sent to journald using
"native" format. In that case, tye key-value pairs are stored in a log
database by journald and journalctl can be used to convert it to e.g.
json, allowing further automated processing.

In the future we might implement other backends, e.g. to other sytem
that like to store key-value pairs.

Hope this helps.

-Otto
___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
https://mailman.powerdns.com/mailman/listinfo/pdns-users


Re: [Pdns-users] structured logging [was: First Alpha Release of PowerDNS Recursor 4.8.0]

2022-09-23 Thread Jan-Piet Mens via Pdns-users

* [1]Structured Logging has been implemented for almost all
  subsystems. This allows for improved (automated) analysis of
  logging information.


Is there any further documentation about this other than the link you added and the 
"Logging" [2] section in the documentation?

What exactly does "structured" mean? Is this JSON? Are there any examples?

-JP


[2] https://docs.powerdns.com/recursor/running.html#logging
___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
https://mailman.powerdns.com/mailman/listinfo/pdns-users