public void trace(String msg) { wrappedLogger.trace(PREFIX + msg); }
public void trace(String msg) { wrappedLogger.trace(PREFIX + msg); }
@Override public void trace(Throwable exception) { LOGGER.trace(exception.getMessage()); } }
/** * Invoke a method using reflection but don't throw any exceptions. * Just log errors instead. * @param obj the object whose method should be invoked * @param method the name of the method to invoke * @param args the arguments to pass to the method */ private void invokeIgnoreExceptions(Object obj, String method, Object... args) { try { invoke(obj, method, args); } catch (NoSuchMethodException e) { logger.trace("Unable to log progress", e); } catch (InvocationTargetException e) { logger.trace("Unable to log progress", e); } catch (IllegalAccessException e) { logger.trace("Unable to log progress", e); } }
/** * Invoke a method using reflection but don't throw any exceptions. * Just log errors instead. * @param obj the object whose method should be invoked * @param method the name of the method to invoke * @param args the arguments to pass to the method */ private void invokeIgnoreExceptions(Object obj, String method, Object... args) { try { invoke(obj, method, args); } catch (NoSuchMethodException e) { logger.trace("Unable to log progress", e); } catch (InvocationTargetException e) { logger.trace("Unable to log progress", e); } catch (IllegalAccessException e) { logger.trace("Unable to log progress", e); } }
/** * Invoke a method using reflection but don't throw any exceptions. * Just log errors instead. * * @param obj the object whose method should be invoked * @param method the name of the method to invoke * @param args the arguments to pass to the method */ private void invokeIgnoreExceptions(Object obj, String method, Object... args) { try { invoke(obj, method, args); } catch (NoSuchMethodException | InvocationTargetException | IllegalAccessException e) { logger.trace("Unable to log progress", e); } }
public boolean stackExists(String stackName) { try { return describeStack(stackName).stream() // .peek(s -> logger.info("Found stack {}", s)) // .filter(s -> s.getStackName().equals(stackName)) // .anyMatch(s -> !s.getStackStatus().equals("REVIEW_IN_PROGRESS")); } catch (final AmazonCloudFormationException e) { if (e.getStatusCode() == 400) { logger.trace("Got exception {}", e.getMessage(), e); return false; } throw e; } }
Document document = Jsoup.parse(file, "UTF-8", file.getParentFile().getAbsolutePath()); for (String elementName : ELEMENTS_TO_ATTRIBUTES.keySet()) { log.trace("elementName = {}", elementName); Elements elements = document.select(elementName); String attributeName = ELEMENTS_TO_ATTRIBUTES.get(elementName);
@Override public void log(String formattedMessage, Level level) { switch (level) { case TRACE: LOGGER.trace(formattedMessage); return; case DEBUG: LOGGER.debug(formattedMessage); return; case INFO: LOGGER.info(formattedMessage); return; case WARN: LOGGER.warn(formattedMessage); return; case ERROR: LOGGER.error(formattedMessage); return; default: throw new IllegalArgumentException(level.name()); } } }
@Override public void log(String formattedMessage, Level level) { switch (level) { case TRACE: LOGGER.trace(formattedMessage); return; case DEBUG: LOGGER.debug(formattedMessage); return; case INFO: LOGGER.info(formattedMessage); return; case WARN: LOGGER.warn(formattedMessage); return; case ERROR: LOGGER.error(formattedMessage); return; default: throw new IllegalArgumentException(level.name()); } } }
getLogger().warn("stack {} not found", stackName); } else if (e.getMessage().contains("No updates are to be performed.")) { getLogger().trace(e.getMessage()); } else { throw e;
getLogger().trace(e.getMessage()); } else { throw e;
break; case STATISTICS: project.getLogger().trace(humanReadableMessage(message)); break; case UNKNOWN: