From 980b7c9fa9a88f7ee3881a4a3c65015da068eb2c Mon Sep 17 00:00:00 2001 From: Manuel Amago Date: Sun, 8 Sep 2019 05:44:02 +0100 Subject: Initial cut of zero GC logging lib Cheated by not offloading to async thread yet --- src/test/java/org/mamago/logging/LoggerTest.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/test/java/org/mamago/logging/LoggerTest.java (limited to 'src/test/java') diff --git a/src/test/java/org/mamago/logging/LoggerTest.java b/src/test/java/org/mamago/logging/LoggerTest.java new file mode 100644 index 0000000..3a1efbd --- /dev/null +++ b/src/test/java/org/mamago/logging/LoggerTest.java @@ -0,0 +1,17 @@ +package org.mamago.logging; + +import org.junit.jupiter.api.Test; + +public class LoggerTest { + final static Logger LOG = Logger.createLogger(); + + @Test + public void testLogger() { + System.out.println("header length = " + + ( 1 // Header length + + 1 // Thread name length + + LoggerTest.class.getName().length() + + 8 + 8 + 1 + "main".length() + 1)); + LOG.log(Logger.Level.INFO, "Log this {}").append(3).log(); + } +} -- cgit v1.2.1