Log Verbosity of a Local Network

I am attempting to get the logging associated with sending a single transaction, so I am running my own local network with logging enabled. The default DEBUG level is generating huge amounts of logs per second, without any input from me. Changing RUST_LOG to INFO shows nothing during CLI operations. Is there a better way currently?

2 Likes

Hi bbush,

Just to make sure I understand you correctly, you’re talking about the logs generated by the Libra nodes and not the logs generated by the CLI client? Is this correct?

If so, I can see what you mean – it appears that logging at the DEBUG level produces a lot of output for these nodes. Setting the level to INFO using RUST_LOG, however, doesn’t produce any log output when executing CLI operations. From what I can tell, I think this is simply a result of the fact that most code doesn’t log at this level. I believe this is because outside of the testing infrastructure (e.g. libra-swarm), the default logging level is actually INFO and so the code avoids logging unnecessarily at this level.

I’m not sure how much this helps you. Is there something specific you’re looking for in the logs? Another way around the issue might be to remove or comment out the logging calls that appear to be displayed excessively at the DEBUG level. This will reduce the logs you see when executing CLI operations. But, again, I’m not sure how helpful this approach is. It depends on what you’re trying to achieve.

2 Likes

It is mostly for demonstration purposes, to display the life of a transaction through the various nodes. I can look into filtering or modifying the source. Thanks

2 Likes