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.
This commit is contained in:
2017-04-10 19:50:49 +02:00
parent 72436e9c8c
commit 24259d7d72
3 changed files with 21 additions and 19 deletions

View File

@@ -4,4 +4,4 @@ db.base=${base.dir}/db
path.tmp=${base.dir}/tmp path.tmp=${base.dir}/tmp
path.output=${base.dir}/out path.output=${base.dir}/out
logging.config=classpath:log4j2.properties logging.config=classpath:log4j2.xml

View File

@@ -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

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration>
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="%d %5p [%-20.20t] %-30.30c{1.} : %m%n"/>
</Console>
</Appenders>
<Loggers>
<Root level="INFO">
<AppenderRef ref="Console"/>
</Root>
<!--
An example of how to reconfigure the log level for a logger.
This example is a no-op.
-->
<logger name="org.lucares.performance.db" level="INFO" additivity="false">
<AppenderRef ref="Console"/>
</logger>
</Loggers>
</Configuration>