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 {
29
29
. create ( true )
30
30
. append ( true )
31
31
. open ( log_file_path. clone ( ) )
32
- . map_err ( |_| ( ) ) ?;
32
+ . map_err ( |e| eprintln ! ( "ERROR: Failed to open log file: {}" , e ) ) ?;
33
33
34
34
// Create a symlink to the current log file, with prior cleanup
35
35
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) ) ?;
38
39
}
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) ) ?;
40
42
}
41
43
42
44
Ok ( Self { file_path : log_file_path, level } )
You can’t perform that action at this time.
0 commit comments