提交 3b860c4a 编写于 作者: D Devin Nusbaum

[JENKINS-57805] Log exceptions thrown from getAffinityKey at FINE level

上级 9012e0ab
......@@ -36,6 +36,8 @@ import hudson.util.ConsistentHash.Hash;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
* Strategy that decides which {@link Task} gets run on which {@link Executor}.
......@@ -116,6 +118,7 @@ public abstract class LoadBalancer implements ExtensionPoint {
try {
key = task.getAffinityKey();
} catch (RuntimeException e) {
LOGGER.log(Level.FINE, null, e);
// Default implementation of Queue.Task.getAffinityKey, we assume it doesn't fail.
key = task.getFullDisplayName();
}
......@@ -174,4 +177,6 @@ public abstract class LoadBalancer implements ExtensionPoint {
};
}
private static final Logger LOGGER = Logger.getLogger(LoadBalancer.class.getName());
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册