nearcore
nearcore copied to clipboard
Remove --verbose in favor of RUST_LOG
By default Near binary only display logs that are info
, warn
and error
, and it is possible to show debug logs for a specific target using -~~verbose <target_name>
(~~-verbose chain
).
After #2480 RUST_LOG
can be used to control which logs are shown, multiple directive can be specified at the same time. For example:
export RUST_LOG=network=trace,chain=info
- [ ] Remove
--verbose
argument as it is not a boolean argument, and for non technical users it is not really clear how to use it. - [ ] Add some help about how to use
RUST_LOG
for near (for developer, and for validators). The idea here is to enumerate all our targets, and whenever relevant explain what do we expect to see from that<target>=<level>
. (For example: usenetwork=debug
to see all the traffic). -
[x] Pass
RUST_LOG
to docker onnearup
https://github.com/near/nearup/pull/32
This is a bit overlapping with #4347, I can remove it with my changes or do it after? Might be conflicts if someone takes this now
I can do this (on top of #4356) if someone shares info on where exactly you would like me to document how to use RUST_LOG. Also if this, any info about what points to be included would be helpful as there are a decent amount of targets and I'm not great at wording these things :)
Once rolling this, we will need to update nearup first to use the same RUST_LOG env var, as it depends still on this flag to pass custom logging parameters.
This issue has been automatically marked as stale because it has not had recent activity in the last 2 months. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity in the last 2 months. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity in the last 2 months. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.
Once rolling this, we will need to update nearup first to use the same RUST_LOG env var, as it depends still on this flag to pass custom logging parameters.
FYI, nearup does use RUST_LOG and does not pass --verbose to neard so from nearup’s point of view removing neard’s --verbose might just as well not exist.
One thing to remember with this change is to introduce a grace period of at least a release or two when --verbose works but prints a warning.
https://github.com/near/nearcore/pull/9547