When using log4j (tried 2.17.0 and 2.20.0) it initializes StackLocator that writes a warning to System.out when not finding sun.reflect.Reflection.getCallerClass - which is true for Java versions >= 9 ...