agd start
standard output/error messages are not consistent
#10820
Labels
agd start
standard output/error messages are not consistent
#10820
Describe the bug
Standard output and error logs generated by the SwingSet VM when running
agd start
are not consistent with the Golang Zerolog output.The VM should match the format of the format of the Golang logs controlled by
agd start --log_format=plain
or--log_format=json
. Ifjson
is specified, then the output format should be entirely machine-readable, like 12-factor apps are designed.Currently, the VM ignores any
--log_format
flags.To Reproduce
Steps to reproduce the behavior:
agd start --log_format=json
partial sample JSON output
``` {"level":"info","module":"consensus","appHeight":26,"stateHeight":26,"storeHeight":27,"time":"2025-01-11T20:46:34-06:00","message":"ABCI Replay Blocks"} {"level":"info","module":"consensus","time":"2025-01-11T20:46:34-06:00","message":"Replay last block using real app"} 2025-01-12T02:46:34.199Z Loading slog sender modules: @agoric/telemetry/src/flight-recorder.js 2025-01-12T02:46:34.292Z chain-main: Prometheus scrape endpoint: http://0.0.0.0:9464/metrics 2025-01-12T02:46:34.898Z launch-chain: Launching SwingSet kernel ```agd start --log_format=plain
partial sample plain output
``` 8:43PM INF received complete proposal block hash=23405292798F9EDD0C74244E092EC511CB8F0B2AA2A888E470367B07A2525507 height=27 module=consensus 8:43PM INF finalizing commit of block hash={} height=27 module=consensus num_txs=0 root=2E9C9AB95656BE0A36A78049F529A89EF58E457FA3905FA64CE791E3BB9F737D 2025-01-12T02:43:58.199Z Loading slog sender modules: @agoric/telemetry/src/flight-recorder.js 2025-01-12T02:43:59.292Z chain-main: Prometheus scrape endpoint: http://0.0.0.0:9464/metrics 2025-01-12T02:44:00.898Z launch-chain: Launching SwingSet kernel 8:44PM INF Timed out dur=3000 height=27 module=consensus round=0 step=3 ```Expected behavior
All of the
--log_format=json
messages should be in JSON format. The--log_format=plain
messages should look similar to the ones produced by the Golang"log"
package. For each format, both Golang and the VM should produce similar timestamps.JSON
Plain
Colouring the
plain
output with matching ANSI escapes is a non-goal, asplain
is only intended for human consumption.Platform Environment
The text was updated successfully, but these errors were encountered: