From 00118be72c2d170aa4ec540016c7d963cb76e50c Mon Sep 17 00:00:00 2001 From: liuhuo Date: Tue, 8 Oct 2024 16:50:55 +0800 Subject: [PATCH 1/2] fix: update template .envrc LOG_LEVEL to LOGLEVEL --- component/template/.envrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/component/template/.envrc b/component/template/.envrc index 4daf9df..1cd84e2 100644 --- a/component/template/.envrc +++ b/component/template/.envrc @@ -1,3 +1,3 @@ export {{crate_name | shouty_snake_case}}_CONFIG=`pwd`/.config export {{crate_name | shouty_snake_case}}_DATA=`pwd`/.data -export {{crate_name | shouty_snake_case}}_LOG_LEVEL=debug +export {{crate_name | shouty_snake_case}}_LOGLEVEL=debug From ef55b25f5f56b899c6916e8fb30d01fbc82d11f1 Mon Sep 17 00:00:00 2001 From: liuhuo Date: Tue, 15 Oct 2024 14:31:44 +0800 Subject: [PATCH 2/2] update:LOG_LEVEL --- component-generated/src/logging.rs | 2 +- component/template/.envrc | 2 +- component/template/src/logging.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/component-generated/src/logging.rs b/component-generated/src/logging.rs index 0dbceff..37df144 100644 --- a/component-generated/src/logging.rs +++ b/component-generated/src/logging.rs @@ -5,7 +5,7 @@ use tracing_subscriber::{fmt, prelude::*, EnvFilter}; use crate::config; lazy_static::lazy_static! { - pub static ref LOG_ENV: String = format!("{}_LOGLEVEL", config::PROJECT_NAME.clone()); + pub static ref LOG_ENV: String = format!("{}_LOG_LEVEL", config::PROJECT_NAME.clone()); pub static ref LOG_FILE: String = format!("{}.log", env!("CARGO_PKG_NAME")); } diff --git a/component/template/.envrc b/component/template/.envrc index 1cd84e2..4daf9df 100644 --- a/component/template/.envrc +++ b/component/template/.envrc @@ -1,3 +1,3 @@ export {{crate_name | shouty_snake_case}}_CONFIG=`pwd`/.config export {{crate_name | shouty_snake_case}}_DATA=`pwd`/.data -export {{crate_name | shouty_snake_case}}_LOGLEVEL=debug +export {{crate_name | shouty_snake_case}}_LOG_LEVEL=debug diff --git a/component/template/src/logging.rs b/component/template/src/logging.rs index 0dbceff..37df144 100644 --- a/component/template/src/logging.rs +++ b/component/template/src/logging.rs @@ -5,7 +5,7 @@ use tracing_subscriber::{fmt, prelude::*, EnvFilter}; use crate::config; lazy_static::lazy_static! { - pub static ref LOG_ENV: String = format!("{}_LOGLEVEL", config::PROJECT_NAME.clone()); + pub static ref LOG_ENV: String = format!("{}_LOG_LEVEL", config::PROJECT_NAME.clone()); pub static ref LOG_FILE: String = format!("{}.log", env!("CARGO_PKG_NAME")); }