From 77e6e4de69b8efca2874280b89791b2129992748 Mon Sep 17 00:00:00 2001 From: Vincent Latombe Date: Tue, 26 Sep 2023 09:54:46 +0200 Subject: [PATCH] Logging XmlFile write to help track race conditions during tests. (#8513) --- core/src/main/java/hudson/XmlFile.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/src/main/java/hudson/XmlFile.java b/core/src/main/java/hudson/XmlFile.java index f624104df673..91d96959b61d 100644 --- a/core/src/main/java/hudson/XmlFile.java +++ b/core/src/main/java/hudson/XmlFile.java @@ -201,6 +201,9 @@ private Object unmarshal(Object o, boolean nullOut) throws IOException { } public void write(Object o) throws IOException { + if (LOGGER.isLoggable(Level.FINEST)) { + LOGGER.log(Level.FINEST, new Throwable(), () -> "Writing " + file); + } mkdirs(); AtomicFileWriter w = force ? new AtomicFileWriter(file)