@Override public void onOutputLine(String line) { logger.log(level, line); } }
@Override public void warn(String message, Throwable t) { log.log(LogLevel.WARN, message, t); } }
@Override public void onOutputLine(String line) { logger.log(level, line); } }
@Override public void log(String message) { logger.log(logLevel, message); } }
private void logInBoth(LogLevel logLevel, String message) { logger.log(logLevel, message); logWriter.println(message); }
private void maybeShowSuccess(String output) { logger.log(LogLevel.INFO, output); logWriter.println(output); }
static void logMsg(LogLevel level, PrintWriter printWriter, String msg) { log.log(level, msg); if (printWriter != null && log.isEnabled(level)) { printWriter.println(msg); } }
static void logMsg(LogLevel level, PrintWriter printWriter, String format, Object arg) { log.log(level, format, arg); if (printWriter != null && log.isEnabled(level)) { printWriter.printf(format.replace("{}", "%s"), arg); printWriter.println(); } }
static void logMsg(LogLevel level, PrintWriter printWriter, String format, Object arg1, Object arg2) { log.log(level, format, arg1, arg2); if (printWriter != null && log.isEnabled(level)) { printWriter.printf(format.replace("{}", "%s"), arg1, arg2); printWriter.println(); } } }
private void maybeShowFailure(String output) { if (numberOfFailedOperationsSeen < configuration.getMaximumFailedOperationsShown()) { logger.log(LogLevel.ERROR, output); } logWriter.println(output); numberOfFailedOperationsSeen++; }
public static void debug(String value) { project.getLogger().log(LogLevel.DEBUG, value); }
public static void warn(String value) { project.getLogger().log(LogLevel.WARN, value); } }
public static void error(String value) { project.getLogger().log(LogLevel.ERROR, value); }
public static void quiet(String value) { project.getLogger().log(LogLevel.QUIET, value); }
public DownPluginDefinition(String name) { this.name = name; try { this.plugin = DownPlugin.valueOf(name.replace('-', '_').toUpperCase(Locale.ROOT)); } catch (IllegalArgumentException e) { LOGGER.log(LogLevel.ERROR, "Could not determine Charm Down Plugin for name '" + name + "'. The following plugins are available: " + Stream.of(DownPlugin.values()).map(DownPlugin::getPluginName).collect(Collectors.joining(", "))); throw new GradleException("Invalid name for Charm Down plugin: " + name, e); } }
@Override public void onRemoval(RemovalNotification<Object, Object> notification) { if (notification.getCause() == RemovalCause.SIZE) { if (evictionCounter % logInterval == 0) { logger.log(LogLevel.INFO, "Cache entries evicted. In-memory cache of {}: Size{{}} MaxSize{{}}, {} {}", cacheId, cache.size(), maxSize, cache.stats(), EVICTION_MITIGATION_MESSAGE); } evictionCounter++; } } }