commit | e26d5d7c6de1ebe686df603e4be1084a27fd7969 | [log] [tgz] |
---|---|---|
author | Antonio Barone <syntonyze@gmail.com> | Tue May 13 11:36:00 2025 +0200 |
committer | Antonio Barone <syntonyze@gmail.com> | Tue May 13 06:37:47 2025 -0700 |
tree | 1977c9eecdcc98b82483a045b4e638a9c18e73f6 | |
parent | bdd877d092fa8a081afd20da89eadc74e7aa95c9 [diff] |
Log the path that caused exception instead of websessions directory Previously, failures while reading a websession file logged the websessions directory, which was not helpful for identifying the offending path. Log the specific file path that triggered the exception instead, so that it can be more easily investigated. Bug: Issue 415076951 Change-Id: I4c292f0f9a5c42af617afdff67409f966c83e83c
diff --git a/src/main/java/com/googlesource/gerrit/plugins/websession/flatfile/FlatFileWebSessionCache.java b/src/main/java/com/googlesource/gerrit/plugins/websession/flatfile/FlatFileWebSessionCache.java index 0c52ce6..5f8016a 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/websession/flatfile/FlatFileWebSessionCache.java +++ b/src/main/java/com/googlesource/gerrit/plugins/websession/flatfile/FlatFileWebSessionCache.java
@@ -211,7 +211,7 @@ log.atFine().withCause(e).log("Exception message %s", e.getMessage()); invalidate(path.getFileName().toString()); } catch (IOException e) { - log.atWarning().withCause(e).log("Cannot read cache %s", websessionsDir); + log.atWarning().withCause(e).log("Cannot read cache %s", path); } } return null;