Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standardise log outputs and make them condensed by default #25

Closed
cwgoes opened this issue Oct 25, 2021 · 3 comments
Closed

Standardise log outputs and make them condensed by default #25

cwgoes opened this issue Oct 25, 2021 · 3 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers ledger prio:low UX

Comments

@cwgoes
Copy link
Contributor

cwgoes commented Oct 25, 2021

Currently it seems like we mix formatted log output, log output from Tendermint in a different format, and miscellaneous print messages:

I[2021-10-25|10:18:00.287] committed state                              module=state height=13440 num_txs=0 app_hash=E433406CBD85E394DD2DB6033EAAF6F40FF56D0B4FEEFB6B78204E33605E4D7E
I[2021-10-25|10:18:00.287] Indexed block                                module=txindex height=13440
Oct 25 10:18:00.331  INFO abci{addr=127.0.0.1:58638}:consensus: anoma::ledger::storage: Began a new epoch 1344
skipping validator update, still the same atest1v4ehgw36x9pnjdfsgsmnydzyx5uy2sesg4q5gden8ymnzv3kx5mngvehgs6yy3pjxc6nj32pjm8shc
skipping validator update, still the same atest1v4ehgw36xvcrxs3sgc6yyd2rx4z5vvpcgymr2d2yxdpngwpkxu65vwfkgdqnqsjzxymnzs2y0a0mxw
skipping validator update, still the same atest1v4ehgw36xdry2dp3g4prgsfkgsuyxdeng9pyg32xxqe5vvfjgg6rzsekxcmngdjxx4zn2wfez5h708
skipping validator update, still the same atest1v4ehgw36x5unyvf4xvur2vejg3pnw3zpx4rr2de4g5crjd34gerryve4ggm5v3fcgc65vdp5sh0zxy
skipping validator update, still the same atest1v4ehgw36xce5vvfcg5myvd6ygy6nss2xxgu5zdp3xsuyvvph8ppy23fkgcuyxd34gy6nsdehttyeve
skipping validator update, still the same atest1v4ehgw36xu6nxw298yenwdpngymy2wpcxdrrzvj9x9zyzse3xv65zs3kxgunsd2z8yenxvekv4llte
skipping validator update, still the same atest1v4ehgw36xumyz33nxsmrwwfk8ppngv3hggc5y3p4xcmrxse4xc6ygdp3gscrww2yxuunysehx5zcwy
skipping validator update, still the same atest1v4ehgw36gvcrys34g9prv3jxgg6rqwpkgse5ywf4xdrrjdf489rrz3jrxgurwvzzg9zrgd33qcg2vg
skipping validator update, still the same atest1v4ehgw36gdzrzv6xxcer2s3sx4pyvs3cxsm5g33ngfryxwfcxq6nz3zxxep52v29xpz523psjm29yp
skipping validator update, still the same atest1v4ehgw36g3q5xsjxg3z5x3zzx3qnvd3kg4zrvwpjxcenjv6rgscn2wzzxgen2vecxfq5zvj9fn29wf
I[2021-10-25|10:18:00.375] executed block                               module=state height=13441 num_valid_txs=0 num_invalid_txs=0
Oct 25 10:18:00.380  INFO abci{addr=127.0.0.1:58638}:consensus: anoma_apps::node::ledger::shell: Committed block hash: 14e44f84e2da759bcf705e677bdd097c03593cd504fa9bf6d874b3ebfec2a524, height: 13441
I[2021-10-25|10:18:00.423] committed state                              module=state height=13441 num_txs=0 app_hash=14E44F84E2DA759BCF705E677BDD097C03593CD504FA9BF6D874B3EBFEC2A524
I[2021-10-25|10:18:00.423] Indexed block                                module=txindex height=13441
I[2021-10-25|10:18:00.515] executed block                               module=state height=13442 num_valid_txs=0 num_invalid_txs=0
Oct 25 10:18:00.518  INFO abci{addr=127.0.0.1:58638}:consensus: anoma_apps::node::ledger::shell: Committed block hash: 14e44f84e2da759bcf705e677bdd097c03593cd504fa9bf6d874b3ebfec2a524, height: 13442
I[2021-10-25|10:18:00.559] committed state                              module=state height=13442 num_txs=0 app_hash=14E44F84E2DA759BCF705E677BDD097C03593CD504FA9BF6D874B3EBFEC2A524
I[2021-10-25|10:18:00.559] Indexed block                                module=txindex height=13442
I[2021-10-25|10:18:00.651] executed block                               module=state height=13443 num_valid_txs=0 num_invalid_txs=0
Oct 25 10:18:00.656  INFO abci{addr=127.0.0.1:58638}:consensus: anoma_apps::node::ledger::shell: Committed block hash: 14e44f84e2da759bcf705e677bdd097c03593cd504fa9bf6d874b3ebfec2a524, height: 13443

I suggest that we do either of the following:

  1. Capture the Tendermint logs, parse them, and reformat them in the Rust standardised format, or
  2. Write the two log outputs (from Rust, and from Tendermint) to separate output files

Separately, we should:

  1. Turn the print messages into standard log outputs, and
  2. Ensure that different levels of granularity in debugging information match up with log levels, which should be settable by a flag when running anoma ledger (or anything else), and
  3. By default, hide most log messages and perhaps even use \r to rewrite the last line in a sort of live condensed mode.
    Consider what Zcash does:

2021-10-25-123809!UNITO-UNDERSCORE!583x667!UNITO-UNDERSCORE!scrot

┆Issue is synchronized with this Asana task by Unito

@tzemanovic
Copy link
Member

I think reducing the logs from tendermint could help with e2e tests memory usage a lot. I'm setting this on prio:high since we've been having more issues with e2e tests again

@cwgoes
Copy link
Contributor Author

cwgoes commented Jan 12, 2023

@Fraccaman what do you think here?

@Fraccaman
Copy link
Member

I agree, having better logs would also be beneficial for our monitoring tool. #979 is applying some minor changes to logs.

@cwgoes cwgoes closed this as completed Feb 5, 2024
phy-chain pushed a commit to phy-chain/namada that referenced this issue Mar 1, 2024
phy-chain pushed a commit to phy-chain/namada that referenced this issue Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers ledger prio:low UX
Projects
No open projects
Status: Tested in Devnet
Development

No branches or pull requests

4 participants