All Downloads are FREE. Search and download functionalities are using the official Maven repository.

janala.logger.StringPrintLogger Maven / Gradle / Ivy

Go to download

JQF: Feedback-directed Quickcheck for Java - Instrumentation and event generation module

There is a newer version: 2.0
Show newest version
package janala.logger;

import janala.logger.inst.Instruction;

public class StringPrintLogger extends AbstractLogger {
  private final StringLogger logger;

  private class FinishThread extends Thread {
    @Override
    public void run() {
      System.out.println("========== Instructions =========");
      System.out.println(logger.getLog());
      System.out.println("==========     End      =========");
    }
  }

  public StringPrintLogger() {
    logger = new StringLogger();
    Runtime.getRuntime().addShutdownHook(new FinishThread());
  }

  @Override
  protected void log(Instruction insn) {
    logger.log(insn);
  }


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy