[logback-user] How to control logback-access.xml initialization log?
coolnodje
coolnodje at gmail.com
Thu Sep 17 09:27:58 CEST 2015
Hi,
I'm using both logback-access.xml and logback.xml in a Spring boot
application.
I have
<logger name="ch.qos.logback" level="WARN" />
set in the logback-spring.xml but on application startup I get the
following log:
//application startup logback.xml formatted log
...
2015-09-17 13:31:49.056 INFO 22580 --- [ main]
s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with
port(s): 8080 (http)
//logback-access init log starts with a different pattern
13:31:49,711 |-INFO in
ch.qos.logback.access.joran.action.ConfigurationAction - debug attribute
not set
13:31:49,714 |-INFO in
ch.qos.logback.core.joran.action.StatusListenerAction - Added status
listener of type [ch.qos.logback.core.status.OnConsoleStatusListener]
13:31:49,715 |-INFO in ch.qos.logback.core.joran.action.AppenderAction -
About to instantiate appender of type
[ch.qos.logback.core.rolling.RollingFileAppender]
13:31:49,715 |-INFO in ch.qos.logback.core.joran.action.AppenderAction -
Naming appender as [querydiff]
13:31:49,752 |-INFO in
ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming
default type [ch.qos.logback.access.boolex.JaninoEventEvaluator] for
[evaluator] property
13:31:49,774 |-INFO in
ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming
default type [ch.qos.logback.core.boolex.Matcher] for [matcher] property
13:31:49,815 |-INFO in
ch.qos.logback.access.boolex.JaninoEventEvaluator at 4fa3ffe0 - Adding
[return] prefix and a semicolon suffix. Expression becomes [return
url.matches(event.getRequestURL().toString());]
13:31:49,815 |-INFO in
ch.qos.logback.access.boolex.JaninoEventEvaluator at 4fa3ffe0 - See also
http://logback.qos.ch/codes.html#block
13:31:50,031 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy - Will
use zip compression
13:31:50,032 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy - Will
use the pattern logs/querydiff-access.%d{yyyy-MM-dd}.log for the active file
13:31:50,033 |-INFO in
c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - The
date pattern is 'yyyy-MM-dd' from file name pattern
'logs/querydiff-access.%d{yyyy-MM-dd}.log.zip'.
13:31:50,033 |-INFO in
c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy -
Roll-over at midnight.
13:31:50,034 |-INFO in
c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy -
Setting initial period to Thu Sep 17 12:44:43 CST 2015
13:31:50,034 |-INFO in
ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming
default type [ch.qos.logback.access.PatternLayoutEncoder] for [encoder]
property
13:31:50,069 |-INFO in
ch.qos.logback.core.rolling.RollingFileAppender[querydiff] - Active log
file name: logs/querydiff-access.log
13:31:50,069 |-INFO in
ch.qos.logback.core.rolling.RollingFileAppender[querydiff] - File
property is set to [logs/querydiff-access.log]
13:31:50,070 |-INFO in
ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender
named [querydiff] to ch.qos.logback.access.tomcat.LogbackValve[]
13:31:50,070 |-INFO in
ch.qos.logback.access.joran.action.ConfigurationAction - End of
configuration.
13:31:50,070 |-INFO in
ch.qos.logback.access.joran.JoranConfigurator at 5814c52f - Registering
current configuration as safe fallback point
13:31:49,711 |-INFO in
ch.qos.logback.access.joran.action.ConfigurationAction - debug attribute
not set
13:31:49,714 |-INFO in
ch.qos.logback.core.joran.action.StatusListenerAction - Added status
listener of type [ch.qos.logback.core.status.OnConsoleStatusListener]
13:31:49,715 |-INFO in ch.qos.logback.core.joran.action.AppenderAction -
About to instantiate appender of type
[ch.qos.logback.core.rolling.RollingFileAppender]
13:31:49,715 |-INFO in ch.qos.logback.core.joran.action.AppenderAction -
Naming appender as [querydiff]
13:31:49,752 |-INFO in
ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming
default type [ch.qos.logback.access.boolex.JaninoEventEvaluator] for
[evaluator] property
13:31:49,774 |-INFO in
ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming
default type [ch.qos.logback.core.boolex.Matcher] for [matcher] property
13:31:49,815 |-INFO in
ch.qos.logback.access.boolex.JaninoEventEvaluator at 4fa3ffe0 - Adding
[return] prefix and a semicolon suffix. Expression becomes [return
url.matches(event.getRequestURL().toString());]
13:31:49,815 |-INFO in
ch.qos.logback.access.boolex.JaninoEventEvaluator at 4fa3ffe0 - See also
http://logback.qos.ch/codes.html#block
13:31:50,031 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy - Will
use zip compression
13:31:50,032 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy - Will
use the pattern logs/querydiff-access.%d{yyyy-MM-dd}.log for the active file
13:31:50,033 |-INFO in
c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - The
date pattern is 'yyyy-MM-dd' from file name pattern
'logs/querydiff-access.%d{yyyy-MM-dd}.log.zip'.
13:31:50,033 |-INFO in
c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy -
Roll-over at midnight.
13:31:50,034 |-INFO in
c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy -
Setting initial period to Thu Sep 17 12:44:43 CST 2015
13:31:50,034 |-INFO in
ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming
default type [ch.qos.logback.access.PatternLayoutEncoder] for [encoder]
property
13:31:50,069 |-INFO in
ch.qos.logback.core.rolling.RollingFileAppender[querydiff] - Active log
file name: logs/querydiff-access.log
13:31:50,069 |-INFO in
ch.qos.logback.core.rolling.RollingFileAppender[querydiff] - File
property is set to [logs/querydiff-access.log]
13:31:50,070 |-INFO in
ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender
named [querydiff] to ch.qos.logback.access.tomcat.LogbackValve[]
13:31:50,070 |-INFO in
ch.qos.logback.access.joran.action.ConfigurationAction - End of
configuration.
13:31:50,070 |-INFO in
ch.qos.logback.access.joran.JoranConfigurator at 5814c52f - Registering
current configuration as safe fallback point
//application startup logback.xml formatted log continues
2015-09-17 13:31:50.138 INFO 22580 --- [ost-startStop-1]
com.ptmind.api.userinfo.Application : Running with Spring
profile(s) : [dev]
Logback-access init code doesn't seem to log through the configured
logback instance.
I hope the problem is clear.
Best
More information about the Logback-user
mailing list