@Test public void createLoggerTail() throws Exception { this.mocker.registerMockComponent(SafeXStream.class); File logFile = new File(XWikiTempDirUtil.createTemporaryDirectory(), "log"); assertTrue( !(this.loggerManager.createLoggerTail(logFile.toPath(), true) instanceof XStreamFileLoggerTail)); assertTrue(this.loggerManager.createLoggerTail(logFile.toPath(), false) instanceof XStreamFileLoggerTail); assertTrue(this.loggerManager.createLoggerTail(logFile.toPath(), true) instanceof XStreamFileLoggerTail); }
@Override public LoggerTail createLoggerTail(Path path, boolean readonly) throws IOException { if (readonly && !XStreamFileLoggerTail.exist(path)) { return new LogQueue(); } else { XStreamFileLoggerTail loggerTail = this.loggerTailProvider.get(); loggerTail.initialize(path, readonly); return loggerTail; } }
DefaultLoggerManager implements LoggerManager, Initializable { @Override public LoggerTail createLoggerTail(Path path, boolean readonly) throws IOException { if (readonly && !XStreamFileLoggerTail.exist(path)) { return new LogQueue(); } else { XStreamFileLoggerTail loggerTail = this.loggerTailProvider.get(); loggerTail.initialize(path, readonly); return loggerTail; } } }
DefaultLoggerManager implements LoggerManager, Initializable { @Override public LoggerTail createLoggerTail(Path path, boolean readonly) throws IOException { if (readonly && !XStreamFileLoggerTail.exist(path)) { return new LogQueue(); } else { XStreamFileLoggerTail loggerTail = this.loggerTailProvider.get(); loggerTail.initialize(path, readonly); return loggerTail; } }  }
DefaultLoggerManager implements LoggerManager, Initializable { @Override public LoggerTail createLoggerTail(Path path, boolean readonly) throws IOException { if (readonly && !XStreamFileLoggerTail.exist(path)) { return new LogQueue(); } else { XStreamFileLoggerTail loggerTail = this.loggerTailProvider.get(); loggerTail.initialize(path, readonly); return loggerTail; } }  @Override void initialize(); @Override void pushLogListener(EventListener listener); @Override EventListener popLogListener(); @Override void setLoggerLevel(String loggerName, LogLevel logLevel); @Override LogLevel getLoggerLevel(String loggerName); @Override Collection<Logger> getLoggers(); @Override LoggerTail createLoggerTail(Path path, boolean readonly); }
DefaultLoggerManager implements LoggerManager, Initializable { @Override public LoggerTail createLoggerTail(Path path, boolean readonly) throws IOException { if (readonly && !XStreamFileLoggerTail.exist(path)) { return new LogQueue(); } else { XStreamFileLoggerTail loggerTail = this.loggerTailProvider.get(); loggerTail.initialize(path, readonly); return loggerTail; } }  @Override void initialize(); @Override void pushLogListener(EventListener listener); @Override EventListener popLogListener(); @Override void setLoggerLevel(String loggerName, LogLevel logLevel); @Override LogLevel getLoggerLevel(String loggerName); @Override Collection<Logger> getLoggers(); @Override LoggerTail createLoggerTail(Path path, boolean readonly);  }