@Test void getLogEvents() throws IOException { this.tail.initialize(new File(this.tmpDir, "log").toPath(), false); assertEquals(0, this.tail.getLogEvents(null).stream().count()); assertEquals(0, this.tail.getLogEvents(LogLevel.DEBUG).stream().count()); this.tail.info("info0"); this.tail.warn("warn0"); this.tail.error("error0"); this.tail.info("info1"); this.tail.warn("warn1"); this.tail.error("error1"); this.tail.info("info2"); this.tail.warn("warn2"); this.tail.error("error2"); assertEquals(9, this.tail.getLogEvents(null).stream().count()); assertEquals(9, this.tail.getLogEvents(LogLevel.DEBUG).stream().count()); assertEquals(9, this.tail.getLogEvents(LogLevel.INFO).stream().count()); assertEquals(6, this.tail.getLogEvents(LogLevel.WARN).stream().count()); assertEquals(3, this.tail.getLogEvents(LogLevel.ERROR).stream().count()); assertEquals(9, this.tail.getLogEvents(0, -1).stream().count()); assertEquals(6, this.tail.getLogEvents(3, -1).stream().count()); assertEquals(3, this.tail.getLogEvents(0, 3).stream().count()); assertEquals(3, this.tail.getLogEvents(3, 3).stream().count()); assertEquals(6, this.tail.getLogEvents(3, 42).stream().count()); assertEquals(9, this.tail.getLogEvents(-1, -1).stream().count()); }
@Override public void initialize(Path path, boolean readonly) throws IOException { super.initialize(path, StandardCharsets.UTF_8, readonly); }
XStreamFileLoggerTail extends AbstractTextFileLoggerTail { @Override public void initialize(Path path, boolean readonly) throws IOException { super.initialize(path, StandardCharsets.UTF_8, readonly); } }
XStreamFileLoggerTail extends AbstractTextFileLoggerTail { @Override public void initialize(Path path, boolean readonly) throws IOException { super.initialize(path, StandardCharsets.UTF_8, readonly); }  }
XStreamFileLoggerTail extends AbstractTextFileLoggerTail { @Override public void initialize(Path path, boolean readonly) throws IOException { super.initialize(path, StandardCharsets.UTF_8, readonly); }  @Override void initialize(Path path, boolean readonly); static boolean exist(Path path); }
XStreamFileLoggerTail extends AbstractTextFileLoggerTail { @Override public void initialize(Path path, boolean readonly) throws IOException { super.initialize(path, StandardCharsets.UTF_8, readonly); }  @Override void initialize(Path path, boolean readonly); static boolean exist(Path path);  }