File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -29,14 +29,16 @@ impl FilesystemLogger {
2929 . create ( true )
3030 . append ( true )
3131 . open ( log_file_path. clone ( ) )
32- . map_err ( |_| ( ) ) ?;
32+ . map_err ( |e| eprintln ! ( "ERROR: Failed to open log file: {}" , e ) ) ?;
3333
3434 // Create a symlink to the current log file, with prior cleanup
3535 let log_file_symlink = parent_dir. join ( "ldk_node_latest.log" ) ;
36- if log_file_symlink. as_path ( ) . exists ( ) && log_file_symlink. as_path ( ) . is_symlink ( ) {
37- fs:: remove_file ( & log_file_symlink) . map_err ( |_| ( ) ) ?;
36+ if log_file_symlink. as_path ( ) . is_symlink ( ) {
37+ fs:: remove_file ( & log_file_symlink)
38+ . map_err ( |e| eprintln ! ( "ERROR: Failed to remove log file symlink: {}" , e) ) ?;
3839 }
39- symlink ( & log_file_name, & log_file_symlink) . map_err ( |_| ( ) ) ?;
40+ symlink ( & log_file_name, & log_file_symlink)
41+ . map_err ( |e| eprintln ! ( "ERROR: Failed to create log file symlink: {}" , e) ) ?;
4042 }
4143
4244 Ok ( Self { file_path : log_file_path, level } )
You can’t perform that action at this time.
0 commit comments