[logback-user] Why is RollingFileAppender so noisy?

cowwoc cowwoc at bbs.darktech.org
Wed Jul 31 07:18:09 CEST 2013


Hi,

     I am trying to configure logback to launch silently (without 
outputting verbose information about its configuration).

     When my configuration file contains:

     <appender name="file" class="ch.qos.logback.core.FileAppender">
         <file>../../../foo.log</file>
         <append>false</append>
         <encoder>
             <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level 
%class{}.%method\(\) - %msg%n</pattern>
         </encoder>
     </appender>

I don't get any output at startup (good!). When I replace this with:

     <appender name="file" 
class="ch.qos.logback.core.rolling.RollingFileAppender">
         <file>../../../foo.log</file>
         <append>false</append>
         <rollingPolicy 
class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>../../../foo.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
             <timeBasedFileNamingAndTriggeringPolicy 
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
                 <maxFileSize>100MB</maxFileSize>
             </timeBasedFileNamingAndTriggeringPolicy>
         </rollingPolicy>
         <encoder>
             <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level 
%class{}.%method\(\) - %msg%n</pattern>
         </encoder>
     </appender>

I suddenly get this output:

01:17:17,188 |-INFO in ch.qos.logback.classic.LoggerContext[default] - 
Could NOT find resource [logback.groovy]
01:17:17,189 |-INFO in ch.qos.logback.classic.LoggerContext[default] - 
Could NOT find resource [logback-test.xml]
01:17:17,189 |-INFO in ch.qos.logback.classic.LoggerContext[default] - 
Found resource [logback.xml] at 
[file:/C:/Users/Gili/Documents/foo.service/web/target/classes/logback.xml]
01:17:17,379 |-INFO in 
ch.qos.logback.classic.joran.action.ConfigurationAction - debug 
attribute not set
01:17:17,391 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - 
About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
01:17:17,395 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - 
Naming appender as [stdout]
01:17:17,425 |-INFO in 
ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming 
default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for 
[encoder] property
01:17:17,482 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - 
About to instantiate appender of type 
[ch.qos.logback.core.rolling.RollingFileAppender]
01:17:17,484 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - 
Naming appender as [file]
01:17:17,519 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy - No 
compression will be used
01:17:17,521 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy - Will 
use the pattern ../../../foo.%d{yyyy-MM-dd}.%i.log for the active file
01:17:17,523 |-INFO in 
ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP at 1ea40b04 - The date 
pattern is 'yyyy-MM-dd' from file name pattern 
'../../../foo.%d{yyyy-MM-dd}.%i.log'.
01:17:17,523 |-INFO in 
ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP at 1ea40b04 - Roll-over 
at midnight.
01:17:17,526 |-INFO in 
ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP at 1ea40b04 - Setting 
initial period to Wed Jul 31 01:17:17 EDT 2013
01:17:17,530 |-INFO in 
ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming 
default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for 
[encoder] property
01:17:17,531 |-WARN in 
ch.qos.logback.core.rolling.RollingFileAppender[file] - Append mode is 
mandatory for RollingFileAppender
01:17:17,533 |-INFO in 
ch.qos.logback.core.rolling.RollingFileAppender[file] - Active log file 
name: ../../../foo.log
01:17:17,533 |-INFO in 
ch.qos.logback.core.rolling.RollingFileAppender[file] - File property is 
set to [../../../foo.log]
01:17:17,535 |-INFO in 
ch.qos.logback.classic.joran.action.LoggerContextListenerAction - Adding 
LoggerContextListener of type 
[ch.qos.logback.classic.jul.LevelChangePropagator] to the object stack
01:17:17,537 |-INFO in 
ch.qos.logback.classic.jul.LevelChangePropagator at 23cf4353 - Propagating 
DEBUG level on Logger[ROOT] onto the JUL framework
01:17:17,542 |-INFO in 
ch.qos.logback.classic.joran.action.LoggerContextListenerAction - 
Starting LoggerContextListener
01:17:17,542 |-INFO in 
ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of 
ROOT logger to TRACE
01:17:17,542 |-INFO in 
ch.qos.logback.classic.jul.LevelChangePropagator at 23cf4353 - Propagating 
TRACE level on Logger[ROOT] onto the JUL framework
01:17:17,542 |-INFO in 
ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender 
named [stdout] to Logger[ROOT]
01:17:17,543 |-INFO in 
ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender 
named [file] to Logger[ROOT]
01:17:17,543 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction 
- Setting level of logger [com.foo.Preconditions] to INFO
01:17:17,543 |-INFO in 
ch.qos.logback.classic.jul.LevelChangePropagator at 23cf4353 - Propagating 
INFO level on Logger[com.foo.Preconditions] onto the JUL framework
01:17:17,543 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction 
- Setting level of logger [com.foo.ToJsonString] to INFO
01:17:17,543 |-INFO in 
ch.qos.logback.classic.jul.LevelChangePropagator at 23cf4353 - Propagating 
INFO level on Logger[com.foo.ToJsonString] onto the JUL framework
01:17:17,544 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction 
- Setting level of logger [com.foo.sql.Session] to INFO
01:17:17,544 |-INFO in 
ch.qos.logback.classic.jul.LevelChangePropagator at 23cf4353 - Propagating 
INFO level on Logger[com.foo.sql.Session] onto the JUL framework
01:17:17,544 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction 
- Setting level of logger [com.google.inject.servlet.GuiceFilter] to OFF
01:17:17,544 |-INFO in 
ch.qos.logback.classic.jul.LevelChangePropagator at 23cf4353 - Propagating 
OFF level on Logger[com.google.inject.servlet.GuiceFilter] onto the JUL 
framework
01:17:17,544 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction 
- Setting level of logger 
[com.sun.jersey.server.impl.ejb.EJBComponentProviderFactoryInitilizer] 
to WARN
01:17:17,544 |-INFO in 
ch.qos.logback.classic.jul.LevelChangePropagator at 23cf4353 - Propagating 
WARN level on 
Logger[com.sun.jersey.server.impl.ejb.EJBComponentProviderFactoryInitilizer] 
onto the JUL framework
01:17:17,544 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction 
- Setting level of logger 
[com.sun.jersey.server.impl.managedbeans.ManagedBeanComponentProviderFactoryInitilizer] 
to WARN
01:17:17,544 |-INFO in 
ch.qos.logback.classic.jul.LevelChangePropagator at 23cf4353 - Propagating 
WARN level on 
Logger[com.sun.jersey.server.impl.managedbeans.ManagedBeanComponentProviderFactoryInitilizer] 
onto the JUL framework
01:17:17,544 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction 
- Setting level of logger 
[com.sun.jersey.server.impl.cdi.CDIComponentProviderFactoryInitializer] 
to WARN
01:17:17,544 |-INFO in 
ch.qos.logback.classic.jul.LevelChangePropagator at 23cf4353 - Propagating 
WARN level on 
Logger[com.sun.jersey.server.impl.cdi.CDIComponentProviderFactoryInitializer] 
onto the JUL framework
01:17:17,544 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction 
- Setting additivity of logger 
[com.sun.jersey.api.container.filter.LoggingFilter] to false
01:17:17,544 |-INFO in 
ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender 
named [file] to Logger[com.sun.jersey.api.container.filter.LoggingFilter]
01:17:17,544 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction 
- Setting level of logger [org.glassfish.grizzly.] to WARN
01:17:17,544 |-INFO in 
ch.qos.logback.classic.jul.LevelChangePropagator at 23cf4353 - Propagating 
WARN level on Logger[org.glassfish.grizzly.] onto the JUL framework
01:17:17,545 |-INFO in 
ch.qos.logback.classic.joran.action.ConfigurationAction - End of 
configuration.
01:17:17,545 |-INFO in 
ch.qos.logback.classic.joran.JoranConfigurator at 7c4d1082 - Registering 
current configuration as safe fallback point

     Any idea why RollingFileAppender is producing all this noise?

Thanks,
Gili


More information about the Logback-user mailing list