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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
20
pdb-ui/src/main/resources/log4j2.xml
Normal file
20
pdb-ui/src/main/resources/log4j2.xml
Normal 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>
|
||||
Reference in New Issue
Block a user