fix: set logging env var if unset
This commit is contained in:
parent
fc8f86a2af
commit
55b7bf92bb
1 changed files with 6 additions and 1 deletions
|
@ -47,7 +47,12 @@ pub const PKG_HOMEPAGE: &str = env!("CARGO_PKG_HOMEPAGE");
|
||||||
#[cfg(not(tarpaulin_include))]
|
#[cfg(not(tarpaulin_include))]
|
||||||
#[actix_web::main]
|
#[actix_web::main]
|
||||||
async fn main() -> std::io::Result<()> {
|
async fn main() -> std::io::Result<()> {
|
||||||
|
{
|
||||||
|
const LOG_VAR: &str = "RUST_LOG";
|
||||||
|
if env::var(LOG_VAR).is_err() {
|
||||||
env::set_var("RUST_LOG", "info");
|
env::set_var("RUST_LOG", "info");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pretty_env_logger::init();
|
pretty_env_logger::init();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue