From 24259d7d72d74f99f9110993a94fc7b5cb221840 Mon Sep 17 00:00:00 2001 From: Andreas Huber Date: Mon, 10 Apr 2017 19:50:49 +0200 Subject: [PATCH] replace log4j2.properties with log4j2.xml The properties support for log4j2 is not well documented and possibly buggy. I couldn't figure out how to change the log level of a logger. --- .../src/main/resources/application.properties | 2 +- pdb-ui/src/main/resources/log4j2.properties | 18 ----------------- pdb-ui/src/main/resources/log4j2.xml | 20 +++++++++++++++++++ 3 files changed, 21 insertions(+), 19 deletions(-) delete mode 100644 pdb-ui/src/main/resources/log4j2.properties create mode 100644 pdb-ui/src/main/resources/log4j2.xml diff --git a/pdb-ui/src/main/resources/application.properties b/pdb-ui/src/main/resources/application.properties index adb1168..4328d87 100644 --- a/pdb-ui/src/main/resources/application.properties +++ b/pdb-ui/src/main/resources/application.properties @@ -4,4 +4,4 @@ db.base=${base.dir}/db path.tmp=${base.dir}/tmp path.output=${base.dir}/out -logging.config=classpath:log4j2.properties +logging.config=classpath:log4j2.xml diff --git a/pdb-ui/src/main/resources/log4j2.properties b/pdb-ui/src/main/resources/log4j2.properties deleted file mode 100644 index 6c4d196..0000000 --- a/pdb-ui/src/main/resources/log4j2.properties +++ /dev/null @@ -1,18 +0,0 @@ -name = PropertiesConfig -appenders = console - -# enable to debug log4j2 -#status=trace - -appender.console.type = Console -appender.console.name = STDOUT -appender.console.layout.type = PatternLayout -appender.console.layout.pattern = %d %5p [%-20.20t] %-30.30c{1.} : %m%n - - - -rootLogger.level = info -rootLogger.appenderRef.stdout.ref = STDOUT - -## log all exceptions thrown by controllers. Otherwise only 500 will be logged. -#log4j.logger.org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver=debug diff --git a/pdb-ui/src/main/resources/log4j2.xml b/pdb-ui/src/main/resources/log4j2.xml new file mode 100644 index 0000000..cf77761 --- /dev/null +++ b/pdb-ui/src/main/resources/log4j2.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file