Skip to content

Conversation

@miodvallat
Copy link
Contributor

Short description

This adds the ability to use structured logging, for most of the authoritative server messages (there are a few log messages left to convert).
Showing this now because there will be minor conflicts with #16691.

Note that there is currently no way to enable structured logging in auth, yet. If you want to test, change the initializer of g_slogStructured in pdns/auth-main.cc.

Checklist

I have:

  • read the CONTRIBUTING.md document
  • read and accepted the Developer Certificate of Origin document, including the AI Policy, and added a "Signed-off-by" to my commits
  • compiled this code
  • tested this code
  • included documentation (including possible behaviour changes)
  • documented the code
  • added or modified regression test(s)
  • added or modified unit test(s)

@coveralls
Copy link

coveralls commented Dec 31, 2025

Pull Request Test Coverage Report for Build 20621562660

Details

  • 752 of 2392 (31.44%) changed or added relevant lines in 58 files are covered.
  • 12162 unchanged lines in 151 files lost coverage.
  • Overall coverage decreased (-1.5%) to 71.85%

Changes Missing Coverage Covered Lines Changed/Added Lines %
modules/bindbackend/bindbackend2.hh 0 1 0.0%
pdns/ixfrdist.cc 0 1 0.0%
pdns/test-distributor_hh.cc 8 9 88.89%
pdns/dnsbackend.cc 0 2 0.0%
modules/godbcbackend/sodbc.cc 3 6 50.0%
modules/bindbackend/binddnssec.cc 1 5 20.0%
modules/remotebackend/pipeconnector.cc 1 5 20.0%
modules/geoipbackend/geoipinterface-mmdb.cc 5 11 45.45%
modules/godbcbackend/godbcbackend.cc 7 14 50.0%
pdns/secpoll-auth.cc 2 10 20.0%
Files with Coverage Reduction New Missed Lines %
modules/bindbackend/binddnssec.cc 1 56.61%
modules/godbcbackend/sodbc.cc 1 73.4%
modules/ldapbackend/native.cc 1 36.77%
modules/pipebackend/coprocess.hh 1 0.0%
modules/remotebackend/pipeconnector.cc 1 59.17%
pdns/backends/gsql/gsqlbackend.hh 1 97.77%
pdns/dnsparser.hh 1 83.15%
pdns/protozero-trace.hh 1 68.37%
modules/geoipbackend/geoipbackend.cc 2 59.07%
modules/gmysqlbackend/gmysqlbackend.cc 2 83.67%
Totals Coverage Status
Change from base Build 20619388903: -1.5%
Covered Lines: 127864
Relevant Lines: 166084

💛 - Coveralls

Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
…umbing.

Setup a syslog structured logger for pdns-server and pdnsutil,
copied from recursor.

Structured logging is not enabled yet in the server and any of its tools.

Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
If they are linked statically, this code runs as a static constructor,
way before the structured logger has a chance to initialize, only
unstructured logging will be available at this point.

Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants