public void log(Level l, String format, Object... elements) { jrds.Util.log(this, namedLogger, l, null, format, elements); }
public void log(Level l, Throwable e, String format, Object... elements) { jrds.Util.log(this, namedLogger, l, e, format, elements); }
protected void log(Level l, String format, Object... elements) { jrds.Util.log(this, namedLogger, l, null, format, elements); }
private void dolog(Level l, String format, Object... elements) { jrds.Util.log(this, logger, l, null, "socket " + host + ":" + port + ": " + format, elements); }
public void log(Level l, String format, Object... elements) { jrds.Util.log(this, namedLogger, l, null, format, elements); }
private void dolog(Level l, Throwable e, String format, Object... elements) { jrds.Util.log(this, logger, l, e, "socket " + host + ":" + port + ": " + format, elements); }
public void log(Level l, Throwable e, String format, Object... elements) { jrds.Util.log(this, namedLogger, l, e, format, elements); }
protected void log(Level l, Throwable e, String format, Object... elements) { jrds.Util.log(this, namedLogger, l, e, format, elements); }
public void log(Level l, String format, Object... elements) { jrds.Util.log(this, Logger.getLogger(getClass()), l, null, format, elements); }
public void log(Level l, Throwable e, String format, Object... elements) { jrds.Util.log(this, Logger.getLogger(getClass()), l, e, format, elements); }
@Override protected boolean removeEldestEntry(Entry<Integer, RendererRun> eldest) { RendererRun rr = eldest.getValue(); if(rr != null && rr.finished && size() > Renderer.this.cacheSize) { return true; } else if(rr != null && size() > Renderer.this.cacheSize) { Util.log(null, logger, Level.DEBUG, null, "Graph queue too short, it's now %d instead of %d", size(), Renderer.this.cacheSize); } return false; }
public Graph getGraph() { Class<Graph> gclass = gd.getGraphClass(); Graph g; Map<String, GenericBean> beansList; try { g = gclass.getConstructor(GraphNode.class).newInstance(this); beansList = ArgFactory.getBeanPropertiesMap(gclass, Graph.class); } catch (InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException | NoSuchMethodException | SecurityException e) { Util.log(this, logger, Level.ERROR, e, "Failed to build a graph instance %s", gclass.getCanonicalName()); return null; } // Resolve the beans for(Map.Entry<String, String> e: beans.entrySet()) { String name = Util.parseTemplate(e.getKey(), probe); String textValue = Util.parseTemplate(e.getValue(), probe); GenericBean bean = beansList.get(name); if(bean == null) { logger.error(String.format("Unknown bean for %s: %s", gd.getName(), name)); continue; } logger.trace(Util.delayedFormatString("Found attribute %s with value %s", name, textValue)); bean.set(g, textValue); } return g; }
/** * Used to create a SocketConnection But it wraps it in a generic object as * jmpxmp implementation is optionnal So it allows to use it in generic * class that don't reference any classes from jmxmp.jar * * @param url The url to the jmxmp agent * @param sf a custom socket factory * @return a com.sun.jmx.remote.socket.SocketConnection to a jmpxmp agent * @throws IOException */ public static Object create(JMXServiceURL url, SocketFactory sf) throws IOException { jrds.Util.log(null, logger, Level.DEBUG, null, "creating a JMXMP socket to %s", url); String host = url.getHost(); int port = url.getPort(); return new JrdsSocketConnection(host, port, sf); }
jrds.Util.log(getClass().getCanonicalName(), logger, Level.ERROR, e1, "store factory %s failed to configure: %s", storeName, e1);
protected void fillGraphDef(RrdGraphDef graphDef) { GraphDesc gd = getGraphDesc(); try { long startsec = getStartSec(); long endsec = getEndSec(); ExtractInfo ei = ExtractInfo.get().make(start, end); graphDef.setStartTime(startsec); graphDef.setEndTime(endsec); PlottableMap customData = node.getCustomData(); if(customData != null) { long step = Math.max((endsec - startsec) / gd.getWidth(), 1); customData.configure(startsec, endsec, step); } setGraphDefData(graphDef, node.getProbe(), ei, customData); if(gd.withLegend()) addlegend(graphDef); } catch (RuntimeException e) { Util.log(this, logger, Level.ERROR, e, "Impossible to create graph definition: %s", e.getMessage()); } }