forked from kemitix/git-next
refactor(server): inline console_subscriber
This commit is contained in:
parent
0721b63448
commit
0b85ac3f8d
1 changed files with 4 additions and 5 deletions
|
@ -7,7 +7,7 @@ use kxio::network::Network;
|
|||
|
||||
use std::path::PathBuf;
|
||||
|
||||
use tracing::{error, info};
|
||||
use tracing::{error, info, level_filters::LevelFilter};
|
||||
|
||||
use crate::{
|
||||
filesystem::FileSystem,
|
||||
|
@ -112,15 +112,14 @@ fn start_actor(
|
|||
pub fn init_logging() -> Result<(), tracing::subscriber::SetGlobalDefaultError> {
|
||||
use tracing_subscriber::prelude::*;
|
||||
|
||||
let console_layer = console_subscriber::ConsoleLayer::builder().spawn();
|
||||
|
||||
let subscriber = tracing_subscriber::fmt::layer()
|
||||
// NOTE: set RUSTLOG in ${root}/.cargo/config
|
||||
.with_target(false)
|
||||
.with_file(true)
|
||||
.with_line_number(true);
|
||||
.with_line_number(true)
|
||||
.with_filter(LevelFilter::INFO);
|
||||
tracing_subscriber::registry()
|
||||
.with(console_layer)
|
||||
.with(console_subscriber::ConsoleLayer::builder().spawn())
|
||||
.with(subscriber)
|
||||
.init();
|
||||
Ok(())
|
||||
|
|
Loading…
Reference in a new issue