WIP: Initial Logging Reconfiguration #2674
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
a4af603 feat:
ant
logs to stderrBREAKING CHANGE: the
--log-output-dest
argument is removed. Logging to file is a bit strange for ashort-lived program, so we now log to stderr. The user can redirect to file if they want to.
Logging is off by default. It is switched on by using the
verbosity
argument in the standard-v
to
-vvvvv
form. This increases the levels fromWARN
toTRACE
.The default logging targets were changed to crates that seem a bit more relevant for using
ant
,and to remove particularly noisy crates, like
ant_bootstrap
. All the crates will log at the samelevel, as defined by the
verbosity
argument; previously the default logging targets used differentlevels for different crates, and those seemed a little arbitrary.
The behaviour of
ANT_LOG
is retained, so the user can still get output for particular crates, oruse the special
all
option to get trace-level logging for all crates.65a8ead chore: remove
otlp
featureThis was a vestige of our attempt to use OpenSearch, so we don't need it any more.
The
opentelemetry
crate references have also been removed.dc60e17 feat: switch off logging by default in
antnode
Previously,
antnode
would log to file by default.Now logging will be enabled if:
ANT_LOG
variable has been used.--log-output-dest
argument has been used.-v
argument has been used.The verbosity argument can take different counts, e.g.,
-vvv
, each count increasing the level ofthe logging from
ERROR
through toTRACE
.The logs will go to
stderr
by default. If the user wants them to go to file, they can use the--log-output-dest
argument and specify either the defaultdata-dir
or a custom path.This setup should be backwards compatible for anybody who has tooling setup to use
--log-output-dest
, but it will be a breaking change for users who are expecting logs to file bydefault.
243a030 chore: remove the
verbosity
argument fromantctl
This was an argument that was implemented in a clumsy manual way that was intended to vary the
amount of output on the node manager. We will need to provide another
verbose
argument on thelocal run
command to control the output of the logs for local networks.We still need to retain the use of it, but instead of setting it via a command line argument, it
will just be set to
Normal
. Thenode-launchpad
sets it toMinimal
in the places where it needsthe text output reduced.
162d66b feat: provide
verbosity
arg forlocal run
cmdThis also provides the
-v
mechanism for varying the logging output for the local network. Thevalue that is set here is passed to each of the node processes.
The logging output destination is to file, otherwise on the terminal you would get a blizzard of
output from all the node processes.