public void trace(String message, Object... args) { checkAndSend(MonitorLevel.TRACE, message, args); }
private void checkAndSend(MonitorLevel level, String message, Object[] args) { if (level.intValue() < monitorable.getLevel().intValue()) { // monitoring is off return; } long timestamp = System.currentTimeMillis(); send(level, timestamp, message, true, args); }
public <T> T createMonitor(Class<T> type, Monitorable monitorable, String destination) throws MonitorCreationException { if (destination == null) { destination = DEFAULT_DESTINATION; } int destinationIndex = router.getDestinationIndex(destination); ClassLoader loader = type.getClassLoader(); Map<Method, DispatchInfo> levels = new HashMap<Method, DispatchInfo>(); for (Method method : type.getMethods()) { DispatchInfo info = createDispatchInfo(type, loader, method); levels.put(method, info); } JDKMonitorHandler handler = new JDKMonitorHandler(destinationIndex, monitorable, router, levels); if (MonitorChannel.class.isAssignableFrom(type) || MonitorProxy.class.isAssignableFrom(type)) { return type.cast(handler); } return type.cast(Proxy.newProxyInstance(loader, new Class[]{type}, handler)); }
private void checkAndSend(MonitorLevel level, String message, Object[] args) { if (level.intValue() < monitorable.getLevel().intValue()) { // monitoring is off return; } long timestamp = System.currentTimeMillis(); send(level, timestamp, message, args); }
public <T> T createMonitor(Class<T> type, Monitorable monitorable, String destination) throws Fabric3Exception { if (destination == null) { destination = DEFAULT_DESTINATION; } int destinationIndex = router.getDestinationIndex(destination); ClassLoader loader = type.getClassLoader(); Map<Method, DispatchInfo> levels = new HashMap<>(); for (Method method : type.getMethods()) { DispatchInfo info = createDispatchInfo(type, loader, method); levels.put(method, info); } JDKMonitorHandler handler = new JDKMonitorHandler(destinationIndex, monitorable, router, levels); if (MonitorChannel.class.isAssignableFrom(type) || MonitorProxy.class.isAssignableFrom(type)) { return type.cast(handler); } return type.cast(Proxy.newProxyInstance(loader, new Class[]{type}, handler)); }
public void severe(String message, Object... args) { checkAndSend(MonitorLevel.SEVERE, message, args); }
private void checkAndSend(MonitorLevel level, String message, Object[] args) { if (level.intValue() < monitorable.getLevel().intValue()) { // monitoring is off return; } long timestamp = System.currentTimeMillis(); send(level, timestamp, message, true, args); }
public <T> T createMonitor(Class<T> type, Monitorable monitorable, String destination) throws Fabric3Exception { if (destination == null) { destination = DEFAULT_DESTINATION; } int destinationIndex = router.getDestinationIndex(destination); ClassLoader loader = type.getClassLoader(); Map<Method, DispatchInfo> levels = new HashMap<>(); for (Method method : type.getMethods()) { DispatchInfo info = createDispatchInfo(type, loader, method); levels.put(method, info); } JDKMonitorHandler handler = new JDKMonitorHandler(destinationIndex, monitorable, router, levels); if (MonitorChannel.class.isAssignableFrom(type) || MonitorProxy.class.isAssignableFrom(type)) { return type.cast(handler); } return type.cast(Proxy.newProxyInstance(loader, new Class[]{type}, handler)); }
public void info(String message, Object... args) { checkAndSend(MonitorLevel.INFO, message, args); }
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { if (args != null && args.length > 10) { throw new UnsupportedOperationException("Unsupported number of monitor arguments: " + args.length); } MonitorLevel currentLevel; String currentMessage; if (level != null) { currentLevel = level; currentMessage = template; } else { DispatchInfo info = infos.get(method); currentLevel = info.getLevel(); currentMessage = info.getMessage(); } if (currentLevel == null || currentLevel.intValue() < monitorable.getLevel().intValue()) { // monitoring is off return null; } long timestamp = System.currentTimeMillis(); send(currentLevel, timestamp, currentMessage, true, args); return null; }
public void trace(String message, Object... args) { checkAndSend(MonitorLevel.TRACE, message, args); }
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { if (args != null && args.length > 10) { throw new UnsupportedOperationException("Unsupported number of monitor arguments: " + args.length); } MonitorLevel currentLevel; String currentMessage; if (level != null) { currentLevel = level; currentMessage = template; } else { DispatchInfo info = infos.get(method); currentLevel = info.getLevel(); currentMessage = info.getMessage(); } if (currentLevel == null || currentLevel.intValue() < monitorable.getLevel().intValue()) { // monitoring is off return null; } long timestamp = System.currentTimeMillis(); send(currentLevel, timestamp, currentMessage, true, args); return null; }
public void warn(String message, Object... args) { checkAndSend(MonitorLevel.WARNING, message, args); }
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { if (args != null && args.length > 10) { throw new UnsupportedOperationException("Unsupported number of monitor arguments: " + args.length); } MonitorLevel currentLevel; String currentMessage; if (level != null) { currentLevel = level; currentMessage = template; } else { DispatchInfo info = infos.get(method); currentLevel = info.getLevel(); currentMessage = info.getMessage(); } if (currentLevel == null || currentLevel.intValue() < monitorable.getLevel().intValue()) { // monitoring is off return null; } long timestamp = System.currentTimeMillis(); send(currentLevel, timestamp, currentMessage, args); return null; }
public void debug(String message, Object... args) { checkAndSend(MonitorLevel.DEBUG, message, args); }
public void severe(String message, Object... args) { checkAndSend(MonitorLevel.SEVERE, message, args); }
public void warn(String message, Object... args) { checkAndSend(MonitorLevel.WARNING, message, args); }
public void trace(String message, Object... args) { checkAndSend(MonitorLevel.TRACE, message, args); }
public void severe(String message, Object... args) { checkAndSend(MonitorLevel.SEVERE, message, args); }
public void warn(String message, Object... args) { checkAndSend(MonitorLevel.WARNING, message, args); }