File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -6,15 +6,17 @@ fn main() {
66 // default logger - It will be output to `stdout`.
77 info ! ( "program started" ) ;
88
9- let file = "config.json" ;
10-
119 // They will be output to `stderr`.
10+ let file = "config.json" ;
1211 error ! ( "failed to open file: {}" , file) ;
1312 warn ! ( "undetermined locale, defaults to `en_US.UTF-8`" ) ;
1413
1514 // Level "trace" and "debug" will be ignored by default, you can modify the
1615 // level filter of the global default logger to enable all levels.
17- spdlog:: default_logger ( ) . set_level_filter ( LevelFilter :: All ) ;
16+ let verbose = true ;
17+ if verbose {
18+ spdlog:: default_logger ( ) . set_level_filter ( LevelFilter :: All ) ;
19+ }
1820
1921 trace ! ( "position x: {}, y: {}" , 11.4 , -5.14 ) ;
2022 // Or if you prefer structured logging.
You can’t perform that action at this time.
0 commit comments