I want to use TinyLog to log Liquibase output. On the Liquibase website I found the information that they are now using JUL for logging: https://docs.liquibase.com/tools-integrations/extensions/extension-upgrade-guides/lb-4.0-upgrade-guide.html?Highlight=logger#How_logging_works
So it seems there is no need to implement an own logger based on the AbstractLogger anymore. Instead I tried to forwared the JUL logging to TinyLog. Therefore I followed the instruction on https://tinylog.org/v2/download-preview/#java-util-logging-jul Now instead of get the Logging of Liquibase I get a StachOverflowError.
I entered the code: org.tinylog.jul.JulTinylogBridge.activate();
to a ServletContextListener that is executed on startup. As soon as the first log method is called I get:
java.lang.StackOverflowError
at org.tinylog.runtime.ModernJavaRuntime.getCallerStackTraceElement(ModernJavaRuntime.java:96)
at org.tinylog.runtime.RuntimeProvider.getCallerStackTraceElement(RuntimeProvider.java:143)
at org.tinylog.core.TinylogLoggingProvider.log(TinylogLoggingProvider.java:164)
at org.tinylog.jul.BridgeHandler.publish(BridgeHandler.java:44)
at java.logging/java.util.logging.Logger.log(Logger.java:979)
at java.logging/java.util.logging.Logger.doLog(Logger.java:1006)
at java.logging/java.util.logging.Logger.logp(Logger.java:1172)
at org.apache.juli.logging.DirectJDKLog.log(DirectJDKLog.java:173)
at org.apache.juli.logging.DirectJDKLog.debug(DirectJDKLog.java:96)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1254)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1220)
at org.tinylog.runtime.ModernJavaRuntime.getCallerStackTraceElement(ModernJavaRuntime.java:96)
at org.tinylog.runtime.RuntimeProvider.getCallerStackTraceElement(RuntimeProvider.java:143)
at org.tinylog.core.TinylogLoggingProvider.log(TinylogLoggingProvider.java:164)