-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(zfctl): improve logs (#266)
This commit brings some improvements to the outputted logs when launching `zfctl` and the `zfctl daemon` command. The most notable additions are: - when starting a Zenoh-Flow Daemon, its name and Zenoh ID will be logged, - the `RUST_LOG` environment variable will be used if specified, - the default logging level was set to `zfctl=info,zenoh_flow=info`. * zfctl/src/daemon_command.rs: - Added a `span` at the top of the `run` method to be used within the `async` block. - Reworked the code to not `panic!` when an error occurred but instead return it and/or add logs. * zfctl/src/instance_command.rs: - Properly display the id of the newly created instance. - Display a command to check for the status of a newly created instance. * zfctl/src/main.rs: - Read the environment variable RUST_LOG to control the logs. - Set the default logging to `zfctl=info,zenoh_flow=info`. - Instrument the async block using a span. * zfctl/src/run_local_command.rs: - Reworked the code to not panic when an error occurred but instead return it and/or add logs. * zfctl/src/utils.rs: - Reworked the code to not panic when an error occurred but instead return it and/or add logs. Signed-off-by: Julien Loudet <julien.loudet@zettascale.tech>
- Loading branch information
Showing
5 changed files
with
220 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.