add some log
This commit is contained in:
parent
ddfd521f4a
commit
d75da67690
@ -34,6 +34,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||||||
let opts = Opts::parse();
|
let opts = Opts::parse();
|
||||||
|
|
||||||
tracing_subscriber::fmt::init();
|
tracing_subscriber::fmt::init();
|
||||||
|
tracing::info!("logger initialied");
|
||||||
|
|
||||||
match opts.subcommand.unwrap_or_default() {
|
match opts.subcommand.unwrap_or_default() {
|
||||||
Subcommand::Serve {
|
Subcommand::Serve {
|
||||||
@ -41,9 +42,10 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||||||
listen_port,
|
listen_port,
|
||||||
} => {
|
} => {
|
||||||
let service = ice_publicip_checker::web::routes::make_service()?;
|
let service = ice_publicip_checker::web::routes::make_service()?;
|
||||||
tracing::info!(listen_address, listen_port, "app is service");
|
tracing::info!(listen_address, listen_port, "binding address...");
|
||||||
let listener =
|
let listener =
|
||||||
tokio::net::TcpListener::bind(format!("{listen_address}:{listen_port}")).await?;
|
tokio::net::TcpListener::bind(format!("{listen_address}:{listen_port}")).await?;
|
||||||
|
tracing::info!(listen_address, listen_port, "app is serving");
|
||||||
axum::serve(listener, service).await?;
|
axum::serve(listener, service).await?;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user