🏡 index : ~doyle/rgit.git

author Jordan Doyle <jordan@doyle.la> 2024-01-15 0:41:29.0 +00:00:00
committer Jordan Doyle <jordan@doyle.la> 2024-01-15 0:41:29.0 +00:00:00
commit
4f1b17b939a30c9604c3c624a326d2ad298e2098 [patch]
tree
22024b5eda2a0a287a8fa313ee21fe9c0c6053f2
parent
bcdd6411d5fcd52d52b06e3fd8f5e56dd373b492
download
4f1b17b939a30c9604c3c624a326d2ad298e2098.tar.gz

Fix missing logs when no RUST_LOG env var is given



Diff

 src/main.rs | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/main.rs b/src/main.rs
index 3792da1..ee61a4c 100644
--- a/src/main.rs
+++ a/src/main.rs
@@ -109,6 +109,10 @@
async fn main() -> Result<(), anyhow::Error> {
    let args: Args = Args::parse();

    if std::env::var_os("RUST_LOG").is_none() {
        std::env::set_var("RUST_LOG", "info");
    }

    let subscriber = tracing_subscriber::fmt().with_env_filter(EnvFilter::from_default_env());
    #[cfg(debug_assertions)]
    let subscriber = subscriber.pretty();