]> git.ipfire.org Git - thirdparty/FORT-validator.git/commit
Rethink logging for Fort 2
authorAlberto Leiva Popper <ydahhrk@gmail.com>
Mon, 29 Sep 2025 19:28:28 +0000 (13:28 -0600)
committerAlberto Leiva Popper <ydahhrk@gmail.com>
Mon, 29 Sep 2025 19:28:28 +0000 (13:28 -0600)
commitac5bf9070d68c13368cc346e2717ee895339c4ac
tree88134501d99513401b1a681501c9082f73ff699c
parentfe8607c74465eb1599fce68eedb6de51061165f6
Rethink logging for Fort 2

- Rename "operation logs" to just "logs"
- Rename "validation logs" to "report"

Rationale: Logging is meant for sysadmin consumption.
Sysadmins don't care if some RPKI objects need to be thrown away.

- Logs can be sent to std streams, files or syslog. Reports only go to files.
  Logs and reports go to different files (because they're different things).
- Subdivide DEBUG into TRC, CLT and DBG.

"TRC"s (traces) are algorithm steps as they happen.
"CLT"s (clutters) are detailed information about what's happening.
"DBG"s are just temporal debugging prints.

- Rename CRIT into PANIC.
- Subdivide ERR ento ERR and CRIT.

"ERR"s are normal, expected errors.
"CRIT"s (criticals) are unexpected (but recoverable) errors.

- Apply #121: Redirect WRNs and ERRs to reports during validation cycles.

Logs actually still get WRNs and ERRs, but they're downgraded to TRCs.

Still TODO:

- Configuration layer has not been updated
- Reports don't print offending file names
19 files changed:
src/Makefile.am
src/config.c
src/config.h
src/config/filename_format.c [deleted file]
src/config/filename_format.h [deleted file]
src/config/types.h
src/daemon.c
src/daemon.h
src/log.c
src/log.h
src/main.c
src/object/certificate.c
src/object/tal.c
src/report.c [new file with mode: 0644]
src/report.h [new file with mode: 0644]
src/thread_var.c
src/types/map.c
src/types/map.h
test/mock.c