Open Ivan-Veselov opened 6 years ago
Investigation: if we run code without plugin from default main method then logger works correctly. It doesn't have (getAllAppenders) any appender but prints to console anyway. If we run this main method in plugin execution (runIde task) then no output in console and logger has no appenders too. Adding appender solves the problem. Also log4j.properties is in classpath so problem must be in plugin execution. Set property doesn't help too: System.setProperty("log4j.configuration", Objects.requireNonNull(Logging.class.getClassLoader().getResource("log4j.properties")).getFile());
Currently Log4J logs are configured in Java code. Simple addition of Log4J property file to resources folder failed for no apparent reason. Seems like Log4J just can't see configuration file.