From dde0d9a58159735727e1d11ce36d66e48493aa82 Mon Sep 17 00:00:00 2001 From: Tim Jacomb Date: Thu, 27 Oct 2022 14:41:17 +0100 Subject: [PATCH] Add debug logging for symbol --- core/src/main/java/org/jenkins/ui/icon/IconSet.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/core/src/main/java/org/jenkins/ui/icon/IconSet.java b/core/src/main/java/org/jenkins/ui/icon/IconSet.java index 20dadf367f0d..498607d36671 100644 --- a/core/src/main/java/org/jenkins/ui/icon/IconSet.java +++ b/core/src/main/java/org/jenkins/ui/icon/IconSet.java @@ -38,6 +38,7 @@ import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.function.Supplier; +import java.util.logging.Logger; import jenkins.model.Jenkins; import org.apache.commons.io.IOUtils; import org.apache.commons.jelly.JellyContext; @@ -52,6 +53,7 @@ */ public class IconSet { + private static final Logger LOGGER = Logger.getLogger(IconSet.class.getName()); public static final IconSet icons = new IconSet(); // keyed by plugin name / core, and then symbol name returning the SVG as a string @@ -141,6 +143,15 @@ public static String getSymbol(String name, String title, String tooltip, String return prependTitleIfRequired(symbol, title); } + @Restricted(NoExternalUse.class) + public static String getSymbol(String name, Integer title, String tooltip, String classes, String pluginName, String id) { + LOGGER.severe( + String.format("INVALID symbol detected, name=%s, title=%d, tooltip=%s, classes=%s, pluginName=%s, id=%s", + name, title, tooltip, classes, pluginName, id)); + + return getSymbol(name, "", tooltip, classes, pluginName, id); + } + private static ClassLoader getClassLoader(String pluginName) { if (pluginName.equals("core")) { return IconSet.class.getClassLoader();