Configures the main logger.
()
| 316 | * Configures the main logger. |
| 317 | */ |
| 318 | private static void setupLogger() { |
| 319 | LoggerContext ctx = (LoggerContext) LogManager.getContext(false); |
| 320 | org.apache.logging.log4j.core.config.Configuration config = ctx.getConfiguration(); |
| 321 | LoggerConfig loggerConfig = config.getLoggerConfig(LogManager.ROOT_LOGGER_NAME); |
| 322 | if (DEBUG) { |
| 323 | loggerConfig.setLevel(Level.DEBUG); |
| 324 | } |
| 325 | ctx.updateLoggers(); |
| 326 | logger.debug("Debug Mode ENABLED!"); |
| 327 | } |
| 328 | |
| 329 | /** |
| 330 | * @return the main configuration. |