File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -260,7 +260,10 @@ impl Logging {
260260 let logs_path = if config. file_enabled {
261261 let base_directory = PathBuf :: from ( base_directory) ;
262262 let logs_subdirectory = PathBuf :: from ( config. path . clone ( ) ) ;
263- let logs_path = base_directory. join ( logs_subdirectory. clone ( ) ) ;
263+ let logs_subdirectory = logs_subdirectory
264+ . canonicalize ( )
265+ . unwrap_or ( logs_subdirectory) ;
266+ let logs_path = base_directory. join ( logs_subdirectory) ;
264267
265268 if let Err ( e) = fs:: create_dir_all ( & logs_path) {
266269 warn ! ( "Failed to create logs directory {logs_path:?}: {e}" ) ;
@@ -642,6 +645,12 @@ impl Default for Logging {
642645 }
643646}
644647
648+ impl Drop for Logging {
649+ fn drop ( & mut self ) {
650+ self . rotation_should_stop . store ( true , Ordering :: Relaxed ) ;
651+ }
652+ }
653+
645654// This is a workaround for a bug with `with_ansi` setting in tracing
646655// Bug thread: https://github.com/tokio-rs/tracing/issues/3116
647656struct NoAnsiFields { }
You can’t perform that action at this time.
0 commit comments