Skip to content

Commit 6e74bcc

Browse files
authored
fix(dgw): improve debug logs for recording path canonicalization (#1273)
It’s easier to diagnostic why canonicalization failed now. Example: > DEBUG listener{port=7171}:http{client=[::1]:60724}:request{method=GETpath=/jet /heartbeat}: devolutions_gateway::api::heartbeat: Failed to canonicalize recording path error=The system cannot find the file specified. (os error 2) recording_path=.\dvls\recordings
1 parent 8f27727 commit 6e74bcc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

devolutions-gateway/src/api/heartbeat.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ pub(super) async fn get_heartbeat(
8383
trace!("System is supporting listing storage disks");
8484

8585
let recording_path = dunce::canonicalize(&conf.recording_path)
86+
.inspect_err(
87+
|error| debug!(%error, recording_path = %conf.recording_path, "Failed to canonicalize recording path"),
88+
)
8689
.unwrap_or_else(|_| conf.recording_path.clone().into_std_path_buf());
8790

8891
let disks = Disks::new_with_refreshed_list();

0 commit comments

Comments
 (0)