public synchronized void onTestFinished() { finishedTestCount++; logger.verbose("finished %d of estimated %d tests. %.2f%%", finishedTestCount, estimatedTestCount, estimatedTestCount == 0 ? 0 : 100f * finishedTestCount / estimatedTestCount); } }
@Override public void processNewLines(String[] lines) { for (String line : lines) { logger.verbose(line); } }
private void verbose(String format, Object...args) { if (VERBOSE) { mLogger.verbose(format, args); } } }
private void verbose(String format, Object...args) { if (VERBOSE) { mLogger.verbose(format, args); } } }
@Override public void processNewLines(String[] lines) { for (String line : lines) { logger.verbose(line); } }
public AaptProcess start() throws IOException, InterruptedException { String[] command = new String[] { mAaptLocation, "m", }; mLogger.verbose("Trying to start %1$s", command[0]); Process process = new ProcessBuilder(command).start(); mLogger.verbose("Started %1$d", process.hashCode()); return new AaptProcess(process, mLogger); } }
public AaptProcess start() throws IOException, InterruptedException { String[] command = new String[] { mAaptLocation, "m", }; mLogger.verbose("Trying to start %1$s", command[0]); Process process = new ProcessBuilder(command).start(); AaptProcess aaptProcess = new AaptProcess(mAaptLocation, process, mLogger); mLogger.verbose("Started %1$d", aaptProcess.hashCode()); return aaptProcess; } }
/** * Log low level diagnostic information. */ void diagnostic(String format, Object... args) { androidBuilder.getLogger().verbose( "External native generate JSON " + variantName + ": " + format, args); }
@Override public boolean checkEntry(String archivePath) throws ZipAbortException { mLogger.verbose("=> %s", archivePath); File duplicate = checkFileForDuplicate(archivePath); if (duplicate != null) { throw new DuplicateFileException(archivePath, duplicate, mInputFile); } else { mAddedFiles.put(archivePath, mInputFile); } return true; } }
@Override public void destruction(@NonNull Thread t) throws IOException, InterruptedException { AaptProcess aaptProcess = mAaptProcesses.get(Thread.currentThread().getName()); if (aaptProcess != null) { mLogger.verbose("Thread(%1$s): notify aapt slave shutdown", Thread.currentThread().getName()); aaptProcess.shutdown(); mAaptProcesses.remove(t.getName()); mLogger.verbose("Thread(%1$s): after shutdown queue_size=%2$d", Thread.currentThread().getName(), mAaptProcesses.size()); } }
@Override public void logVerbose(@NonNull String s) { mWrapped.verbose(s); }
@Override public void err(@Nullable String line) { if (line != null) { if (mInError.get()) { mErrorBuilder.append(line); } mLogger.verbose("AAPT warning(%1$s), Job(%2$s): %3$s", mOwner.getProcess().hashCode(), mJob, line); mLogger.warning("AAPT: %1$s", line); } } }
private void uninstall(@NonNull File apkFile, @Nullable String packageName, @NonNull String deviceName) throws DeviceException { if (packageName != null) { logger.verbose("DeviceConnector '%s': uninstalling %s", deviceName, packageName); device.uninstallPackage(packageName, timeoutInMs, logger); } else { logger.verbose("DeviceConnector '%s': unable to uninstall %s: unable to get package name", deviceName, apkFile); } } }
private void uninstall(@NonNull File apkFile, @Nullable String packageName, @NonNull String deviceName) throws DeviceException { if (packageName != null) { logger.verbose("DeviceConnector '%s': uninstalling %s", deviceName, packageName); device.uninstallPackage(packageName, timeoutInMs, logger); } else { logger.verbose("DeviceConnector '%s': unable to uninstall %s: unable to get package name", deviceName, apkFile); } } }
/** * Initial dump of the merging tool actions, need to be refined and spec'ed out properly. * @param logger logger to log to at INFO level. */ void log(@NonNull ILogger logger) { logger.verbose(getLogs()); }
@Override public void run(@NonNull Job<AaptProcess> job, @NonNull JobContext<AaptProcess> context) throws IOException { mLogger.verbose("Thread(%1$s): begin executing job %2$s", Thread.currentThread().getName(), job.getJobTitle()); context.getPayload().crunch(from, to, job); mLogger.verbose("Thread(%1$s): done executing job %2$s", Thread.currentThread().getName(), job.getJobTitle()); }
private void uninstall(@NonNull File apkFile, @Nullable String packageName, @NonNull String deviceName) throws DeviceException { if (packageName != null) { logger.verbose("DeviceConnector '%s': uninstalling %s", deviceName, packageName); device.uninstallPackage(packageName, timeoutInMs, logger); } else { logger.verbose( "DeviceConnector '%s': unable to uninstall %s: unable to get package name", deviceName, apkFile); } }
@Override public void testEnded(TestIdentifier test, Map<String, String> testMetrics) { if (!mFailedTests.remove(test)) { // if wasn't present in the list, then the test succeeded. if (mLogger != null) { mLogger.verbose("\n%1$s > %2$s[%3$s] \033[32mSUCCESS \033[0m", test.getClassName(), test.getTestName(), mDeviceName); } } super.testEnded(test, testMetrics); }
@Override public void err(@Nullable String line) { if (line != null) { mLogger.verbose("AAPT warning(%1$s), Job(%2$s): %3$s", mOwner.getProcess().hashCode(), mJob, line); mLogger.warning("AAPT: %3$s", mOwner.getProcess().hashCode(), mJob, line); } } }
public IncrementalVisitor( @NonNull ClassNode classNode, @NonNull List<ClassNode> parentNodes, @NonNull ClassVisitor classVisitor, @NonNull ILogger logger) { super(Opcodes.ASM5, classVisitor); this.classNode = classNode; this.parentNodes = parentNodes; this.logger = logger; this.logger.verbose("%s: Visiting %s", getClass().getSimpleName(), classNode.name); }