Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit 7464781

Browse files
authored
fix(logging): set up logging before subcommands are executed (#927)
Set up logging before subcommands are executed
1 parent 35b50a6 commit 7464781

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/bin/inx-chronicle/main.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,13 @@ async fn main() -> eyre::Result<()> {
3232

3333
let cl_args = ClArgs::parse();
3434
let config = cl_args.get_config()?;
35+
36+
set_up_logging(&config)?;
37+
3538
if cl_args.process_subcommands(&config).await? == PostCommand::Exit {
3639
return Ok(());
3740
}
3841

39-
set_up_logging(&config)?;
40-
4142
info!("Connecting to database using hosts: `{}`.", config.mongodb.hosts_str()?);
4243
let db = MongoDb::connect(&config.mongodb).await?;
4344
debug!("Available databases: `{:?}`", db.get_databases().await?);

0 commit comments

Comments
 (0)