public static void main(String[] args) { long start = System.currentTimeMillis(); final TLogEntry entry = new TLogEntry(); entry.setSessionId(321234L); entry.setLogLevel(77); entry.setSecurityLevel(1234); entry.setPosixTimestamp(6141234321L); entry.setMessage("This is a test message for the system................................ A"); final LogEntryOutput output = new LogEntryOutput(1024); output.setMarshallable(entry); final ChronicleQueue queue = ChronicleQueue.singleBuilder( OS.TARGET + "/test-" + System.nanoTime()) .rollCycle(RollCycles.HOURLY) .build(); final ExcerptAppender appender = queue.acquireAppender(); Jvm.setExceptionHandlers(Slf4jExceptionHandler.FATAL, Slf4jExceptionHandler.WARN, Slf4jExceptionHandler.WARN); for (int j = 0; j < 100; ++j) { for (int i = 0; i < 100000; ++i) { appender.writeBytes(output); } System.out.println((j + 1) * 100000); // Jvm.pause(100L); } queue.close(); System.out.println("took " + (System.currentTimeMillis() - start) / 1e3); }
@Deprecated public static void setExceptionsHandlers(@Nullable ExceptionHandler fatal, @Nullable ExceptionHandler warn, @Nullable ExceptionHandler debug) { setExceptionHandlers(fatal, warn, debug); }
@Deprecated public static void setExceptionsHandlers(@Nullable ExceptionHandler fatal, @Nullable ExceptionHandler warn, @Nullable ExceptionHandler debug) { setExceptionHandlers(fatal, warn, debug); }
public static void setExceptionHandlers(@Nullable ExceptionHandler fatal, @Nullable ExceptionHandler warn, @Nullable ExceptionHandler debug, @Nullable ExceptionHandler perf) { setExceptionHandlers(fatal, warn, debug); PERF.defaultHandler(perf); }
public static void setExceptionHandlers(@Nullable ExceptionHandler fatal, @Nullable ExceptionHandler warn, @Nullable ExceptionHandler debug, @Nullable ExceptionHandler perf) { setExceptionHandlers(fatal, warn, debug); PERF.defaultHandler(perf); }