Skip to content

Commit

Permalink
Add debug logging for symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
timja committed Oct 27, 2022
1 parent 074d8c6 commit dde0d9a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions core/src/main/java/org/jenkins/ui/icon/IconSet.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit dde0d9a

Please sign in to comment.