<div dir="ltr"><div>Check out <a href="http://stackoverflow.com/questions/3257154/how-to-prevent-logback-from-outputting-its-own-status-at-the-start-of-every-log">http://stackoverflow.com/questions/3257154/how-to-prevent-logback-from-outputting-its-own-status-at-the-start-of-every-log</a><br>

</div>  (*Chris*)<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jul 30, 2013 at 10:18 PM, cowwoc <span dir="ltr"><<a href="mailto:cowwoc@bbs.darktech.org" target="_blank">cowwoc@bbs.darktech.org</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
    I am trying to configure logback to launch silently (without outputting verbose information about its configuration).<br>
<br>
    When my configuration file contains:<br>
<br>
    <appender name="file" class="ch.qos.logback.core.<u></u>FileAppender"><br>
        <file>../../../foo.log</file><br>
        <append>false</append><br>
        <encoder><br>
            <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %class{}.%method\(\) - %msg%n</pattern><br>
        </encoder><br>
    </appender><br>
<br>
I don't get any output at startup (good!). When I replace this with:<br>
<br>
    <appender name="file" class="ch.qos.logback.core.<u></u>rolling.RollingFileAppender"><br>
        <file>../../../foo.log</file><br>
        <append>false</append><br>
        <rollingPolicy class="ch.qos.logback.core.<u></u>rolling.<u></u>TimeBasedRollingPolicy"><br>
<fileNamePattern>../../../foo.<u></u>%d{yyyy-MM-dd}.%i.log</<u></u>fileNamePattern><br>
            <<u></u>timeBasedFileNamingAndTriggeri<u></u>ngPolicy class="ch.qos.logback.core.<u></u>rolling.SizeAndTimeBasedFNATP"<u></u>><br>
                <maxFileSize>100MB</<u></u>maxFileSize><br>
            </<u></u>timeBasedFileNamingAndTriggeri<u></u>ngPolicy><br>
        </rollingPolicy><br>
        <encoder><br>
            <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %class{}.%method\(\) - %msg%n</pattern><br>
        </encoder><br>
    </appender><br>
<br>
I suddenly get this output:<br>
<br>
01:17:17,188 |-INFO in ch.qos.logback.classic.<u></u>LoggerContext[default] - Could NOT find resource [logback.groovy]<br>
01:17:17,189 |-INFO in ch.qos.logback.classic.<u></u>LoggerContext[default] - Could NOT find resource [logback-test.xml]<br>
01:17:17,189 |-INFO in ch.qos.logback.classic.<u></u>LoggerContext[default] - Found resource [logback.xml] at [file:/C:/Users/Gili/<u></u>Documents/foo.service/web/<u></u>target/classes/logback.xml]<br>
01:17:17,379 |-INFO in ch.qos.logback.classic.joran.<u></u>action.ConfigurationAction - debug attribute not set<br>
01:17:17,391 |-INFO in ch.qos.logback.core.joran.<u></u>action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.<u></u>ConsoleAppender]<br>
01:17:17,395 |-INFO in ch.qos.logback.core.joran.<u></u>action.AppenderAction - Naming appender as [stdout]<br>
01:17:17,425 |-INFO in ch.qos.logback.core.joran.<u></u>action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.<u></u>encoder.PatternLayoutEncoder] for [encoder] property<br>
01:17:17,482 |-INFO in ch.qos.logback.core.joran.<u></u>action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.<u></u>RollingFileAppender]<br>
01:17:17,484 |-INFO in ch.qos.logback.core.joran.<u></u>action.AppenderAction - Naming appender as [file]<br>
01:17:17,519 |-INFO in c.q.l.core.rolling.<u></u>TimeBasedRollingPolicy - No compression will be used<br>
01:17:17,521 |-INFO in c.q.l.core.rolling.<u></u>TimeBasedRollingPolicy - Will use the pattern ../../../foo.%d{yyyy-MM-dd}.%<u></u>i.log for the active file<br>
01:17:17,523 |-INFO in ch.qos.logback.core.rolling.<u></u>SizeAndTimeBasedFNATP@1ea40b04 - The date pattern is 'yyyy-MM-dd' from file name pattern '../../../foo.%d{yyyy-MM-dd}.%<u></u>i.log'.<br>
01:17:17,523 |-INFO in ch.qos.logback.core.rolling.<u></u>SizeAndTimeBasedFNATP@1ea40b04 - Roll-over at midnight.<br>
01:17:17,526 |-INFO in ch.qos.logback.core.rolling.<u></u>SizeAndTimeBasedFNATP@1ea40b04 - Setting initial period to Wed Jul 31 01:17:17 EDT 2013<br>
01:17:17,530 |-INFO in ch.qos.logback.core.joran.<u></u>action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.<u></u>encoder.PatternLayoutEncoder] for [encoder] property<br>
01:17:17,531 |-WARN in ch.qos.logback.core.rolling.<u></u>RollingFileAppender[file] - Append mode is mandatory for RollingFileAppender<br>
01:17:17,533 |-INFO in ch.qos.logback.core.rolling.<u></u>RollingFileAppender[file] - Active log file name: ../../../foo.log<br>
01:17:17,533 |-INFO in ch.qos.logback.core.rolling.<u></u>RollingFileAppender[file] - File property is set to [../../../foo.log]<br>
01:17:17,535 |-INFO in ch.qos.logback.classic.joran.<u></u>action.<u></u>LoggerContextListenerAction - Adding LoggerContextListener of type [ch.qos.logback.classic.jul.<u></u>LevelChangePropagator] to the object stack<br>


01:17:17,537 |-INFO in ch.qos.logback.classic.jul.<u></u>LevelChangePropagator@23cf4353 - Propagating DEBUG level on Logger[ROOT] onto the JUL framework<br>
01:17:17,542 |-INFO in ch.qos.logback.classic.joran.<u></u>action.<u></u>LoggerContextListenerAction - Starting LoggerContextListener<br>
01:17:17,542 |-INFO in ch.qos.logback.classic.joran.<u></u>action.RootLoggerAction - Setting level of ROOT logger to TRACE<br>
01:17:17,542 |-INFO in ch.qos.logback.classic.jul.<u></u>LevelChangePropagator@23cf4353 - Propagating TRACE level on Logger[ROOT] onto the JUL framework<br>
01:17:17,542 |-INFO in ch.qos.logback.core.joran.<u></u>action.AppenderRefAction - Attaching appender named [stdout] to Logger[ROOT]<br>
01:17:17,543 |-INFO in ch.qos.logback.core.joran.<u></u>action.AppenderRefAction - Attaching appender named [file] to Logger[ROOT]<br>
01:17:17,543 |-INFO in ch.qos.logback.classic.joran.<u></u>action.LoggerAction - Setting level of logger [com.foo.Preconditions] to INFO<br>
01:17:17,543 |-INFO in ch.qos.logback.classic.jul.<u></u>LevelChangePropagator@23cf4353 - Propagating INFO level on Logger[com.foo.Preconditions] onto the JUL framework<br>
01:17:17,543 |-INFO in ch.qos.logback.classic.joran.<u></u>action.LoggerAction - Setting level of logger [com.foo.ToJsonString] to INFO<br>
01:17:17,543 |-INFO in ch.qos.logback.classic.jul.<u></u>LevelChangePropagator@23cf4353 - Propagating INFO level on Logger[com.foo.ToJsonString] onto the JUL framework<br>
01:17:17,544 |-INFO in ch.qos.logback.classic.joran.<u></u>action.LoggerAction - Setting level of logger [com.foo.sql.Session] to INFO<br>
01:17:17,544 |-INFO in ch.qos.logback.classic.jul.<u></u>LevelChangePropagator@23cf4353 - Propagating INFO level on Logger[com.foo.sql.Session] onto the JUL framework<br>
01:17:17,544 |-INFO in ch.qos.logback.classic.joran.<u></u>action.LoggerAction - Setting level of logger [com.google.inject.servlet.<u></u>GuiceFilter] to OFF<br>
01:17:17,544 |-INFO in ch.qos.logback.classic.jul.<u></u>LevelChangePropagator@23cf4353 - Propagating OFF level on Logger[com.google.inject.<u></u>servlet.GuiceFilter] onto the JUL framework<br>
01:17:17,544 |-INFO in ch.qos.logback.classic.joran.<u></u>action.LoggerAction - Setting level of logger [com.sun.jersey.server.impl.<u></u>ejb.<u></u>EJBComponentProviderFactoryIni<u></u>tilizer] to WARN<br>
01:17:17,544 |-INFO in ch.qos.logback.classic.jul.<u></u>LevelChangePropagator@23cf4353 - Propagating WARN level on Logger[com.sun.jersey.server.<u></u>impl.ejb.<u></u>EJBComponentProviderFactoryIni<u></u>tilizer] onto the JUL framework<br>


01:17:17,544 |-INFO in ch.qos.logback.classic.joran.<u></u>action.LoggerAction - Setting level of logger [com.sun.jersey.server.impl.<u></u>managedbeans.<u></u>ManagedBeanComponentProviderFa<u></u>ctoryInitilizer] to WARN<br>


01:17:17,544 |-INFO in ch.qos.logback.classic.jul.<u></u>LevelChangePropagator@23cf4353 - Propagating WARN level on Logger[com.sun.jersey.server.<u></u>impl.managedbeans.<u></u>ManagedBeanComponentProviderFa<u></u>ctoryInitilizer] onto the JUL framework<br>


01:17:17,544 |-INFO in ch.qos.logback.classic.joran.<u></u>action.LoggerAction - Setting level of logger [com.sun.jersey.server.impl.<u></u>cdi.<u></u>CDIComponentProviderFactoryIni<u></u>tializer] to WARN<br>
01:17:17,544 |-INFO in ch.qos.logback.classic.jul.<u></u>LevelChangePropagator@23cf4353 - Propagating WARN level on Logger[com.sun.jersey.server.<u></u>impl.cdi.<u></u>CDIComponentProviderFactoryIni<u></u>tializer] onto the JUL framework<br>


01:17:17,544 |-INFO in ch.qos.logback.classic.joran.<u></u>action.LoggerAction - Setting additivity of logger [com.sun.jersey.api.container.<u></u>filter.LoggingFilter] to false<br>
01:17:17,544 |-INFO in ch.qos.logback.core.joran.<u></u>action.AppenderRefAction - Attaching appender named [file] to Logger[com.sun.jersey.api.<u></u>container.filter.<u></u>LoggingFilter]<br>
01:17:17,544 |-INFO in ch.qos.logback.classic.joran.<u></u>action.LoggerAction - Setting level of logger [org.glassfish.grizzly.] to WARN<br>
01:17:17,544 |-INFO in ch.qos.logback.classic.jul.<u></u>LevelChangePropagator@23cf4353 - Propagating WARN level on Logger[org.glassfish.grizzly.] onto the JUL framework<br>
01:17:17,545 |-INFO in ch.qos.logback.classic.joran.<u></u>action.ConfigurationAction - End of configuration.<br>
01:17:17,545 |-INFO in ch.qos.logback.classic.joran.<u></u>JoranConfigurator@7c4d1082 - Registering current configuration as safe fallback point<br>
<br>
    Any idea why RollingFileAppender is producing all this noise?<br>
<br>
Thanks,<br>
Gili<br>
______________________________<u></u>_________________<br>
Logback-user mailing list<br>
<a href="mailto:Logback-user@qos.ch" target="_blank">Logback-user@qos.ch</a><br>
<a href="http://mailman.qos.ch/mailman/listinfo/logback-user" target="_blank">http://mailman.qos.ch/mailman/<u></u>listinfo/logback-user</a><br>
</blockquote></div><br></div>