add: logger
This commit is contained in:
@@ -2,6 +2,7 @@ use clap::Parser as _;
|
||||
|
||||
mod args;
|
||||
mod config;
|
||||
mod log;
|
||||
mod server;
|
||||
|
||||
mod consts {
|
||||
@@ -10,6 +11,7 @@ mod consts {
|
||||
|
||||
fn main() -> anyhow::Result<()> {
|
||||
let args = args::Args::parse();
|
||||
log::state::set_log_level(args.loglevel);
|
||||
|
||||
match args.command {
|
||||
args::Command::Serve {
|
||||
@@ -20,7 +22,8 @@ fn main() -> anyhow::Result<()> {
|
||||
|
||||
let config = config::Config::open(config_path)?;
|
||||
|
||||
println!("{config:#?}");
|
||||
#[cfg(debug_assertions)]
|
||||
crate::log::macros::trace!("{config:#?}");
|
||||
|
||||
let rt = tokio::runtime::Builder::new_multi_thread()
|
||||
.enable_all()
|
||||
|
||||
Reference in New Issue
Block a user