[logback-user] Why is RollingFileAppender so noisy?

Chris Pratt thechrispratt at gmail.com
Wed Jul 31 07:29:11 CEST 2013


Check out
http://stackoverflow.com/questions/3257154/how-to-prevent-logback-from-outputting-its-own-status-at-the-start-of-every-log
  (*Chris*)


On Tue, Jul 30, 2013 at 10:18 PM, cowwoc <cowwoc at bbs.darktech.org> wrote:

> 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>
>             <**timeBasedFileNamingAndTriggeri**ngPolicy
> class="ch.qos.logback.core.**rolling.SizeAndTimeBasedFNATP"**>
>                 <maxFileSize>100MB</**maxFileSize>
>             </**timeBasedFileNamingAndTriggeri**ngPolicy>
>         </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.**
> EJBComponentProviderFactoryIni**tilizer] 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.**EJBComponentProviderFactoryIni**tilizer]
> 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.**
> ManagedBeanComponentProviderFa**ctoryInitilizer] 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.**
> ManagedBeanComponentProviderFa**ctoryInitilizer] 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.**
> CDIComponentProviderFactoryIni**tializer] 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.**CDIComponentProviderFactoryIni**tializer]
> 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
> ______________________________**_________________
> Logback-user mailing list
> Logback-user at qos.ch
> http://mailman.qos.ch/mailman/**listinfo/logback-user<http://mailman.qos.ch/mailman/listinfo/logback-user>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20130730/f3b1549f/attachment.html>


More information about the Logback-user mailing list