58ae1df684
This PR is a bit in preparation for the slog work in #28187 . Our current test re logging mostly test the internals, but we have no real end-to-end test of the logging output. This PR introduces a simple reexec-based log tester. This also relies upon a special mode in geth, which can be made to eject a set of predefined log messages (only available if the build-tag `integrationtests` is used e.g. go run --tags=integrationtests ./cmd/geth --log.format terminal logtest While working on this, I also noticed a quirk in the setup: when geth was configured to use a file output, then two separate handlers were used (one handler for the file, one handler for the console). Using two separate handlers means that two formatters are used, thus the formatting of any/all records happened twice. This PR changes the mechanism to use two separate io.Writers instead, which is both more optimal and fixes a bug which occurs due to a global statefulness in the formatter. |
||
---|---|---|
.. | ||
testdata | ||
accountcmd_test.go | ||
accountcmd.go | ||
attach_test.go | ||
chaincmd.go | ||
config.go | ||
consolecmd_test.go | ||
consolecmd.go | ||
dbcmd.go | ||
exportcmd_test.go | ||
genesis_test.go | ||
les_test.go | ||
logging_test.go | ||
logtestcmd_active.go | ||
logtestcmd_inactive.go | ||
main.go | ||
misccmd.go | ||
run_test.go | ||
snapshot.go | ||
verkle.go | ||
version_check_test.go | ||
version_check.go |