package skadistats.clarity.logger;

import java.util.HashMap;
import java.util.Map;

public class PrintfLoggerFactory {

    private static final Map<String, PrintfLogger> loggerCache = new HashMap<>();

    public static PrintfLogger getLogger(Enum category) {
        return getLogger(category.name());
    }

    public static PrintfLogger getLogger(String name) {
        PrintfLogger logger = loggerCache.get(name);
        if (logger == null) {
            logger = new PrintfLogger(org.slf4j.LoggerFactory.getLogger(name));
            loggerCache.put(name, logger);
        }
        return logger;
    }

}

@@ -29,16 +29,82 @@
 ogger;%0A%0A
+import org.slf4j.ILoggerFactory;%0Aimport org.slf4j.LoggerFactory;%0A%0A
 import j
@@ -121,16 +121,39 @@
 ashMap;%0A
+import java.util.List;%0A
 import j
@@ -286,16 +286,482 @@
 p%3C%3E();%0A%0A
+    static %7B%0A        try %7B%0A            ILoggerFactory f = LoggerFactory.getILoggerFactory();%0A            Class%3C? extends ILoggerFactory%3E c = f.getClass();%0A            if (c.getName().equals(%22ch.qos.logback.classic.LoggerContext%22)) %7B%0A                List%3CString%3E frameworkPackages = (List%3CString%3E) c.getMethod(%22getFrameworkPackages%22).invoke(f);%0A                frameworkPackages.add(%22skadistats.clarity.logger%22);%0A            %7D%0A        %7D catch (Exception e) %7B%7D%0A    %7D%0A%0A
     publ

remove PrintfLogger from logging stacktrace