forked from kemitix/git-next
feat: load log levels from env RUST_LOG
This commit is contained in:
parent
c85eee85e9
commit
77d35e8a09
1 changed files with 3 additions and 2 deletions
|
@ -5,7 +5,8 @@ use git_next_git::repository::RepositoryFactory;
|
|||
use git_next_server_actor::Server;
|
||||
use kxio::{fs::FileSystem, network::Network};
|
||||
use std::path::PathBuf;
|
||||
use tracing::{error, info, level_filters::LevelFilter};
|
||||
use tracing::{error, info};
|
||||
use tracing_subscriber::EnvFilter;
|
||||
|
||||
pub fn init(fs: FileSystem) {
|
||||
let file_name = "git-next-server.toml";
|
||||
|
@ -64,7 +65,7 @@ pub fn init_logging() {
|
|||
.with_target(false)
|
||||
.with_file(true)
|
||||
.with_line_number(true)
|
||||
.with_filter(LevelFilter::INFO);
|
||||
.with_filter(EnvFilter::from_default_env());
|
||||
tracing_subscriber::registry()
|
||||
.with(console_subscriber::ConsoleLayer::builder().spawn())
|
||||
.with(subscriber)
|
||||
|
|
Loading…
Reference in a new issue