Log stack traces for OldDataMonitor.report on Run (#27500)

* Log stack straces for `OldDataMonitor.report` on `Run`

* Ignore `ReportException` https://github.com/jenkinsci/jenkins/pull/27500#discussion_r4195992415

* Reduce messages to `FINE` so they can be collected if and when desired https://github.com/jenkinsci/jenkins/pull/27500#discussion_r4196269765
This commit is contained in:
Jesse Glick authored and GitHub committed 2026-10-07 21:32:30 -06:00
1 parent c365518dcb
commit a41a51fe48
1 file changed
+5
@@ -185,6 +185,11 @@ public class OldDataMonitor extends AdministrativeMonitor {
*/
public static void report(Saveable obj, Collection<Throwable> errors) {
if (obj instanceof Run<?, ?>) {
if (LOGGER.isLoggable(Level.FINE)) {
for (var error : errors) {
LOGGER.log(Level.FINE, "Trouble loading " + obj, error);
}
}
return; // somewhat ephemeral
}
StringBuilder buf = new StringBuilder();