File tree Expand file tree Collapse file tree 3 files changed +17
-2
lines changed
Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -517,7 +517,10 @@ fn log_setup(args: Args) -> Option<tracing_appender::non_blocking::WorkerGuard>
517517
518518 println ! ( "Mode: {:?}" , args. mode) ;
519519 println ! ( "Config: {}" , args. config) ;
520- println ! ( "LogLevel(flag): {:?}" , args. log_level) ;
520+ match args. log_level {
521+ Some ( ll) => println ! ( "LogLevel(flag): {}" , ll) ,
522+ None => println ! ( "LogLevel(flag): none" ) ,
523+ }
521524
522525 const RL : & str = "RUST_LOG" ;
523526
Original file line number Diff line number Diff line change @@ -24,6 +24,19 @@ pub enum Mode {
2424#[ derive( Debug , Clone , Copy ) ]
2525pub struct LevelWrapper ( pub tracing:: Level ) ;
2626
27+ impl std:: fmt:: Display for LevelWrapper {
28+ fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
29+ let s = match self . 0 {
30+ Level :: ERROR => "ERROR" ,
31+ Level :: WARN => "WARN" ,
32+ Level :: INFO => "INFO" ,
33+ Level :: DEBUG => "DEBUG" ,
34+ Level :: TRACE => "TRACE" ,
35+ } ;
36+ f. write_str ( s)
37+ }
38+ }
39+
2740#[ cfg( feature = "api_server" ) ]
2841impl utoipa:: PartialSchema for LevelWrapper {
2942 fn schema ( ) -> utoipa:: openapi:: RefOr < utoipa:: openapi:: schema:: Schema > {
Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ Refer to rucimp crate for config file format related implements and more proxy p
1313pub mod map;
1414pub mod net;
1515pub mod relay;
16- // pub mod user;
1716pub mod utils;
1817
1918pub const VERSION : & str = env ! ( "CARGO_PKG_VERSION" ) ;
You can’t perform that action at this time.
0 commit comments