Skip to content

Commit bc0b42f

Browse files
committed
Refined fix that does not fully revert #475
1 parent 168f682 commit bc0b42f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/main/java/com/cloudbees/hudson/plugins/folder/ChildLoader.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,12 @@ public <V extends TopLevelItem> V loadItem(AbstractFolder<V> parent, File subdir
9191
item.onLoad(parent, name);
9292
return item;
9393
} catch (Exception e) {
94-
LOGGER.log(Level.WARNING, "could not load " + subdir, e);
94+
if (e instanceof FileNotFoundException && !LOGGER.isLoggable(Level.FINE)) {
95+
// commonplace error from missing config.xml, avoid log spam unless FINE is enabled anyway
96+
LOGGER.warning(() -> "could not load " + subdir + " due to " + e);
97+
} else {
98+
LOGGER.log(Level.WARNING, "could not load " + subdir, e);
99+
}
95100
return null;
96101
}
97102
}

0 commit comments

Comments
 (0)