cardano-node icon indicating copy to clipboard operation
cardano-node copied to clipboard

cardano-node should improve logging clarity

Open sunapi386 opened this issue 3 years ago • 4 comments

Internal/External External otherwise.

Area Other Any other topic (Delegation, Ranking, ...).

Summary Cardano-node logs include too much unnecessary haskell data-structure specific information. This is bad because it is increases log size without providing any additional value.

E.g.

Nov 10 12:13:07 relay1 cardano-node[66273]: [relay1:cardano.node.Mempool:Info:207475] [2022-11-10 20:13:07.06 UTC] fromList [("kind",String "TraceMempoolAddedTx"),("mempoolSize",Object (fromList [("bytes",Number 36322.0),("numTxs",Number 21.0)])),("tx",Object (fromList [("txid",String "879588a7")]))]
Nov 10 12:13:08 relay1 cardano-node[66273]: [relay1:cardano.node.LeadershipCheck:Info:154] [2022-11-10 20:13:08.00 UTC] {"chainDensity":4.8895936e-2,"credentials":"Cardano","delegMapSize":1226822,"kind":"TraceStartLeadershipCheck","slot":76544897,"utxoSize":8906282}
Nov 10 12:13:08 relay1 cardano-node[66273]: [relay1:cardano.node.Forge:Info:154] [2022-11-10 20:13:08.02 UTC] fromList [("credentials",String "Cardano"),("val",Object (fromList [("kind",String "TraceNodeNotLeader"),("slot",Number 7.6544897e7)]))]
Nov 10 12:13:09 relay1 cardano-node[66273]: [relay1:cardano.node.LeadershipCheck:Info:154] [2022-11-10 20:13:09.00 UTC] {"chainDensity":4.8895936e-2,"credentials":"Cardano","delegMapSize":1226822,"kind":"TraceStartLeadershipCheck","slot":76544898,"utxoSize":8906282}
Nov 10 12:13:09 relay1 cardano-node[66273]: [relay1:cardano.node.Forge:Info:154] [2022-11-10 20:13:09.02 UTC] fromList [("credentials",String "Cardano"),("val",Object (fromList [("kind",String "TraceNodeNotLeader"),("slot",Number 7.6544898e7)]))]
Nov 10 12:13:09 relay1 cardano-node[66273]: [relay1:cardano.node.Mempool:Info:207475] [2022-11-10 20:13:09.92 UTC] fromList [("kind",String "TraceMempoolAddedTx"),("mempoolSize",Object (fromList [("bytes",Number 41599.0),("numTxs",Number 22.0)])),("tx",Object (fromList [("txid",String "bc6ac097")]))]

Steps to reproduce Steps to reproduce the behavior:

  1. Run cardano-node.
  2. View the logs.

Expected behavior I hope the logs reduce the amount printed and improve readability overall.

System info (please complete the following information):

  • OS Name: Ubuntu
  • OS Version 20.04
  • Node version cardano-node 1.35.3 - linux-x86_64 - ghc-8.10 git rev 950c4e222086fed5ca53564e642434ce9307b0b9
  • CLI version cardano-cli 1.35.3 - linux-x86_64 - ghc-8.10 git rev 950c4e222086fed5ca53564e642434ce9307b0b9

sunapi386 avatar Nov 10 '22 20:11 sunapi386

@sunapi386 I aggree, especially we should not use show for data which contains Value (which is an intermediate representation of json in Haskell).

coot avatar Nov 21 '22 13:11 coot

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 120 days.

github-actions[bot] avatar Jan 02 '23 01:01 github-actions[bot]

I think this needs to be kept alive.

erikd avatar May 11 '23 01:05 erikd

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 120 days.

github-actions[bot] avatar Oct 25 '25 02:10 github-actions[bot]