@Test public void testLoggerWithConsecutiveReads() throws IOException, TException { File tmpDir = TempDirectory.create(true); String logFilePath = tmpDir.getPath(); String testFilePath = initialize(logFilePath, testFileName); RandomAccessFile tfile = null; TTransport transport = null; try { tfile = new RandomAccessFile(testFilePath, "r"); InputStream is = new FileInputStream(tfile.getFD()); transport = new TFastFramedTransport(new TIOStreamTransport(is), 10000); TProtocol protocol = new TBinaryProtocol(transport); LogMessage logMessage = new LogMessage(); for (int i = 0; i < messages.length; i++) { logMessage.read(protocol); assertEquals(logMessage, messages[i]); } } catch (IOException e) { e.printStackTrace(); assert (false); } finally { if (transport != null) { transport.close(); } if (tfile != null) { tfile.close(); } } cleanup(logFilePath); }
public void close() { appender.stop(); }
LogbackThriftLogger extends BaseThriftLogger { public void close() { appender.stop(); } }
LogbackThriftLogger extends BaseThriftLogger { public void close() { appender.stop(); } @Deprecated  LogbackThriftLogger(Appender<LogMessage> appender);  LogbackThriftLogger(String topic, Appender<LogMessage> appender); }
LogbackThriftLogger extends BaseThriftLogger { public void close() { appender.stop(); } @Deprecated  LogbackThriftLogger(Appender<LogMessage> appender);  LogbackThriftLogger(String topic, Appender<LogMessage> appender); @Override void append(byte[] partitionKey, byte[] message, long timeNanos); @Override void append(byte[] partitionKey, TBase thriftMessage, long timeNanos); void close(); }
LogbackThriftLogger extends BaseThriftLogger { public void close() { appender.stop(); } @Deprecated  LogbackThriftLogger(Appender<LogMessage> appender);  LogbackThriftLogger(String topic, Appender<LogMessage> appender); @Override void append(byte[] partitionKey, byte[] message, long timeNanos); @Override void append(byte[] partitionKey, TBase thriftMessage, long timeNanos); void close();  }