bsc/cmd/geth
Martin Holst Swende 58ae1df684
cmd/geth: test for logging-output (#28373)
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.
2023-10-25 17:57:12 +02:00
..
testdata cmd/geth: test for logging-output (#28373) 2023-10-25 17:57:12 +02:00
accountcmd_test.go cmd: migrate to urfave/cli/v2 (#24751) 2022-06-27 18:22:36 +02:00
accountcmd.go cmd/geth: make account commands not require datadir lock (#27084) 2023-04-27 06:57:29 -04:00
attach_test.go cmd/geth: atomic types used (#27756) 2023-07-24 13:22:54 +03:00
chaincmd.go cmd, core: resolve scheme from a read-write database (#28313) 2023-10-11 11:27:44 +03:00
config.go cmd, eth: switch the dev synctarget to hash from block (#28209) 2023-09-29 22:11:15 +03:00
consolecmd_test.go rpc, internal/cmdtest: increase timeout in tests (#27083) 2023-05-22 08:13:03 -04:00
consolecmd.go node: remove unused error return from Attach (#27450) 2023-06-14 08:24:47 -04:00
dbcmd.go cmd/geth: ensure db is closed before exit (#28150) 2023-09-25 18:28:20 +02:00
exportcmd_test.go cmd/utils: enable snapshot generation in import-mode (#25990) 2022-10-19 08:20:39 +02:00
genesis_test.go cmd/geth: fix failing test (#28322) 2023-10-12 09:54:00 +02:00
les_test.go cmd/geth: atomic types used (#27756) 2023-07-24 13:22:54 +03:00
logging_test.go cmd/geth: test for logging-output (#28373) 2023-10-25 17:57:12 +02:00
logtestcmd_active.go cmd/geth: test for logging-output (#28373) 2023-10-25 17:57:12 +02:00
logtestcmd_inactive.go cmd/geth: test for logging-output (#28373) 2023-10-25 17:57:12 +02:00
main.go cmd/geth: test for logging-output (#28373) 2023-10-25 17:57:12 +02:00
misccmd.go all: remove ethash pow, only retain shims needed for consensus and tests (#27178) 2023-05-03 12:58:39 +03:00
run_test.go all: use T.TempDir to create temporary test directories (#24633) 2022-04-08 15:44:55 +02:00
snapshot.go cmd/geth: ensure db is closed before exit (#28150) 2023-09-25 18:28:20 +02:00
verkle.go cmd/geth: ensure db is closed before exit (#28150) 2023-09-25 18:28:20 +02:00
version_check_test.go deps: update minisign (#28066) 2023-09-07 04:18:46 -04:00
version_check.go cmd: migrate to urfave/cli/v2 (#24751) 2022-06-27 18:22:36 +02:00