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:
antlogs to stderrBREAKING CHANGE: the
--log-output-destargument 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
verbosityargument in the standard-vto
-vvvvvform. This increases the levels fromWARNtoTRACE.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
verbosityargument; previously the default logging targets used differentlevels for different crates, and those seemed a little arbitrary.
The behaviour of
ANT_LOGis retained, so the user can still get output for particular crates, oruse the special
alloption to get trace-level logging for all crates.65a8ead chore: remove
otlpfeatureThis was a vestige of our attempt to use OpenSearch, so we don't need it any more.
The
opentelemetrycrate references have also been removed.dc60e17 feat: switch off logging by default in
antnodePreviously,
antnodewould log to file by default.Now logging will be enabled if:
ANT_LOGvariable has been used.--log-output-destargument has been used.-vargument has been used.The verbosity argument can take different counts, e.g.,
-vvv, each count increasing the level ofthe logging from
ERRORthrough toTRACE.The logs will go to
stderrby default. If the user wants them to go to file, they can use the--log-output-destargument and specify either the defaultdata-diror 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
verbosityargument fromantctlThis 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
verboseargument on thelocal runcommand 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-launchpadsets it toMinimalin the places where it needsthe text output reduced.
162d66b feat: provide
verbosityarg forlocal runcmdThis also provides the
-vmechanism 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.