31 lines
676 B
Rust
31 lines
676 B
Rust
use clap::Parser;
|
|
use tracing::{Level, event};
|
|
|
|
mod args;
|
|
use args::{ActionType, CommandArgs};
|
|
|
|
mod config;
|
|
|
|
#[tokio::main]
|
|
async fn main() {
|
|
let args = CommandArgs::parse();
|
|
|
|
match &args.action {
|
|
ActionType::Serve(serve_args) => {
|
|
tracing_subscriber::fmt()
|
|
.with_max_level(serve_args.log_level)
|
|
.init();
|
|
|
|
event!(Level::ERROR, "error");
|
|
event!(Level::WARN, "warn");
|
|
event!(Level::INFO, "info");
|
|
event!(Level::DEBUG, "debug");
|
|
event!(Level::TRACE, "trace");
|
|
|
|
println!("{:#?}", args);
|
|
|
|
// println!("{:#?}", config);
|
|
}
|
|
}
|
|
}
|