+ ThinLogging() {
+// executor = Executors.newCachedThreadPool((r) -> {
+// Thread t = new Thread(r);
+// t.setDaemon(true);
+// return t;
+// });
+ if (synchronous) {
+ publisher = new LogEntryPublisher();
+ synchronousSubscriber = new PrintStreamSubscriber();
+ } else {
+ publisher = new LogEntryPublisher();
+
+ PrintStreamSubscriber subscriber = new PrintStreamSubscriber();
+ publisher.subscribe(subscriber);
+
+ Runtime.getRuntime().addShutdownHook(new Thread(() -> close(), "Log shutdown"));