BasicConfigurator replacement in log4j2
The solution above works, but since default log level is ERROR, not all logs are shown. Log level can be adjusted with Configurator.setRootLevel method:
Configurator.initialize(new DefaultConfiguration());
Configurator.setRootLevel(Level.INFO);
Configurator.initialize(new DefaultConfiguration());