@@ -19,15 +19,10 @@ static ALLOC: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;
1919
2020async fn handle_request ( req : Request < Body > , next : Next ) -> Result < Response < Body > , StatusCode > {
2121 tracing:: info!(
22- "http {} {}{}" ,
22+ path = req. uri( ) . path( ) ,
23+ query = req. uri( ) . query( ) . unwrap_or_default( ) ,
24+ "http {}" ,
2325 req. method( ) . to_string( ) . to_lowercase( ) ,
24- req. uri( ) . path( ) . cyan( ) ,
25- if let Some ( query) = req. uri( ) . query( ) {
26- format!( "?{query}" )
27- } else {
28- "" . to_string( )
29- }
30- . bright_cyan( )
3126 ) ;
3227
3328 Ok ( wings_rs:: response:: ACCEPT_HEADER
@@ -156,11 +151,8 @@ async fn main() {
156151 tracing:: info!( " \\ _/\\ _/ |_|_| |_|\\ __, |___/__ ___ " ) ;
157152 tracing:: info!( " __/ | | '__/ __|" ) ;
158153 tracing:: info!( " |___/ | | \\ __ \\ " ) ;
159- tracing:: info!(
160- "{: >25} |_| |___/" ,
161- format!( "{} (git-{})" , wings_rs:: VERSION , wings_rs:: GIT_COMMIT )
162- ) ;
163- tracing:: info!( "github.com/calagopus/wings\n " ) ;
154+ tracing:: info!( "{: >25} |_| |___/" , wings_rs:: VERSION ) ;
155+ tracing:: info!( "github.com/calagopus/wings#{}\n " , wings_rs:: GIT_COMMIT ) ;
164156 }
165157 }
166158
@@ -465,15 +457,10 @@ async fn main() {
465457 ) ) ;
466458
467459 tracing:: info!(
468- "{} listening on {} {}" ,
469- "ssh server" . yellow( ) ,
460+ "ssh server listening on {} (app@{}, {}ms)" ,
470461 address. to_string( ) . cyan( ) ,
471- format!(
472- "(app@{}, {}ms)" ,
473- wings_rs:: VERSION ,
474- state. start_time. elapsed( ) . as_millis( )
475- )
476- . bright_black( )
462+ wings_rs:: VERSION ,
463+ state. start_time. elapsed( ) . as_millis( )
477464 ) ;
478465
479466 match server. run_on_address ( Arc :: new ( config) , address) . await {
@@ -516,11 +503,7 @@ async fn main() {
516503 . context ( "failed to load SSL certificate and key" )
517504 . unwrap ( ) ;
518505
519- tracing:: info!(
520- "{} listening on {}" ,
521- "https server" . bright_red( ) ,
522- address. to_string( ) . cyan( ) ,
523- ) ;
506+ tracing:: info!( "https listening on {}" , address. to_string( ) . cyan( ) , ) ;
524507
525508 match axum_server:: bind_rustls ( address, config)
526509 . serve ( router. into_make_service_with_connect_info :: < SocketAddr > ( ) )
@@ -538,11 +521,7 @@ async fn main() {
538521 }
539522 }
540523 } else {
541- tracing:: info!(
542- "{} listening on {}" ,
543- "http server" . bright_red( ) ,
544- address. to_string( ) . cyan( ) ,
545- ) ;
524+ tracing:: info!( "http listening on {}" , address. to_string( ) . cyan( ) , ) ;
546525
547526 match axum:: serve (
548527 match tokio:: net:: TcpListener :: bind ( address) . await {
@@ -578,11 +557,7 @@ async fn main() {
578557 {
579558 let socket_path = & state. config . api . host ;
580559
581- tracing:: info!(
582- "{} listening on {}" ,
583- "http server" . bright_red( ) ,
584- socket_path. cyan( ) ,
585- ) ;
560+ tracing:: info!( "http server listening on {}" , socket_path. cyan( ) , ) ;
586561
587562 let router = router. layer ( axum:: middleware:: from_fn (
588563 |mut req : Request , next : Next | async move {
0 commit comments