package testcode; import java.io.File; import java.io.IOException; import java.nio.file.Files; import java.util.logging.Level; import org.eclipse.jdt.annotation.NonNull; import tudelft.utilities.logging.ReportToFile; import tudelft.utilities.logging.Reporter; /** * Example that uses ImmutableList which is a custom external library. */ public class Reporter1 { private static @NonNull File FILE = new File("test.log"); static public void main(String[] args) throws SecurityException, IOException { final @NonNull Reporter reporter = new ReportToFile(FILE); reporter.log(Level.INFO, "ok"); // this writes "ok" to the file System.out.println(new String(Files.readAllBytes(FILE.toPath()))); } }