File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -464,9 +464,7 @@ pub struct Handle {
464464impl Handle {
465465 /// Sets the logging configuration.
466466 pub fn set_config ( & self , config : Config ) {
467- let shared = SharedLogger :: new ( config) ;
468- log:: set_max_level ( shared. root . max_log_level ( ) ) ;
469- self . shared . store ( Arc :: new ( shared) ) ;
467+ self . reconfigure ( config, EnvMode :: Single )
470468 }
471469
472470 /// Sets the logging configuration with optionally adjusting the global logger settings through the `log`` crate.
@@ -479,6 +477,11 @@ impl Handle {
479477 } ;
480478 self . shared . store ( Arc :: new ( shared) ) ;
481479 }
480+
481+ /// Get the maximum log level according to the current configuration
482+ pub fn max_log_level ( & self ) -> LevelFilter {
483+ self . shared . load ( ) . root . max_log_level ( )
484+ }
482485}
483486
484487/// Logger environment mode used for reconfiguration
You can’t perform that action at this time.
0 commit comments