mirror of
https://github.com/matter-labs/teepot.git
synced 2025-07-21 15:13:56 +02:00
refactor(logging): enhance logging setup and usage
- Modified the `setup_logging` function to return a `Subscriber`, improving flexibility and reuse. - Integrated `tracing::subscriber::set_global_default` in the main functions to establish the logging subscriber globally. - Added configurations for span events and control over file and line information display. Signed-off-by: Harald Hoyer <harald@matterlabs.dev>
This commit is contained in:
parent
5b7f7482e6
commit
f0fea5c122
3 changed files with 25 additions and 10 deletions
|
@ -110,7 +110,10 @@ struct Arguments {
|
|||
async fn main() -> Result<()> {
|
||||
let args = Arguments::parse();
|
||||
|
||||
setup_logging(&args.log_level)?;
|
||||
tracing::subscriber::set_global_default(setup_logging(
|
||||
env!("CARGO_CRATE_NAME"),
|
||||
&args.log_level,
|
||||
)?)?;
|
||||
|
||||
info!("Quote verified! Connection secure!");
|
||||
|
||||
|
|
|
@ -26,7 +26,11 @@ use zksync_basic_types::L1BatchNumber;
|
|||
#[tokio::main]
|
||||
async fn main() -> Result<()> {
|
||||
let args = Arguments::parse();
|
||||
setup_logging(&args.log_level)?;
|
||||
tracing::subscriber::set_global_default(setup_logging(
|
||||
env!("CARGO_CRATE_NAME"),
|
||||
&args.log_level,
|
||||
)?)?;
|
||||
|
||||
validate_arguments(&args)?;
|
||||
let (stop_sender, stop_receiver) = watch::channel(false);
|
||||
let mut process_handle = tokio::spawn(verify_batches_proofs(stop_receiver, args));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue