
Hi, for some reasons logback always prints out it's status/debug information to STDOUT although I didn't ask for it, what could be the reason for this? I have this very simple logback.xml file which path I pass through command line parameter -Dlogback.configurationFile=/home/u123456/bmbstatistics/conf/logback.xml (it was created using the translator tool on the website from a log4j properties file (which btw doesn't "transfer" the properties like LOG_PATH, so a little manual modification was necessary) <?xml version="1.0" encoding="UTF-8"?> <configuration> <property name="GENERIC_PATTERN" value="[%d{dd.MM.yyyy HH:mm:ss.SSS}] [%t] [%-5p] [%c{2}] %m%n" /> <property name="LOG_PATH" value="./log" /> <appender name="FileAppender" class="ch.qos.logback.core.rolling.RollingFileAppender"> <!--See also http://logback.qos.ch/manual/appenders.html#RollingFileAppender--> <File>${LOG_PATH}/statistics.log</File> <layout class="ch.qos.logback.classic.PatternLayout"> <Pattern>${GENERIC_PATTERN}</Pattern> </layout> <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> <maxIndex>20</maxIndex> <FileNamePattern>${LOG_PATH}/statistics.log.%i</FileNamePattern> </rollingPolicy> <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> <MaxFileSize>20MB</MaxFileSize> </triggeringPolicy> </appender> <root level="DEBUG"> <appender-ref ref="FileAppender"/> </root> </configuration> When I start my application with this config the following appears on stdout: 12:55:20,531 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [FILE:/home/u123456/bmbstatistics/conf/logback.xml] at [file:/home/u123456/bmbstatistics/conf/logback.xml] 12:55:20,687 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set 12:55:20,688 |-INFO in ch.qos.logback.classic.turbo.ReconfigureOnChangeFilter@291946c2 - Will scan for changes in file [/home/u123456/bmbstatistics/conf/logback.xml] every 60 seconds. 12:55:20,688 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Adding ReconfigureOnChangeFilter as a turbo filter 12:55:20,690 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender] 12:55:20,698 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [FileAppender] 12:55:20,748 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Pushing component [layout] on top of the object stack. 12:55:20,814 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Pushing component [rollingPolicy] on top of the object stack. 12:55:20,827 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@3a747fa2 - No compression will be used 12:55:20,828 |-WARN in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@3a747fa2 - Large window sizes are not allowed. 12:55:20,828 |-WARN in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@3a747fa2 - MaxIndex reduced to 13 12:55:20,832 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Pushing component [triggeringPolicy] on top of the object stack. 12:55:20,840 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FileAppender] - Active log file name: ./log/bmbstatistics.log 12:55:20,840 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FileAppender] - File property is set to [./log/bmbstatistics.log] 12:55:20,841 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Popping appender named [FileAppender] from the object stack 12:55:20,841 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to DEBUG 12:55:20,842 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [FileAppender] to Logger[ROOT] How can I disable this logging to stdout? thanks in adavance, regards, christian!

Look like the reason is this one: 12:55:20,828 |-WARN in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@3a747fa2 - Large window sizes are not allowed. 12:55:20,828 |-WARN in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@3a747fa2 - MaxIndex reduced to 13 12:55:20,832 |-INFO in Aleksey 22.03.2010 17:57, Christian Migowski пишет:
12:55:20,828 |-WARN in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@3a747fa2 - Large window sizes are not allowed. 12:55:20,828 |-WARN in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@3a747fa2 - MaxIndex reduced to 13 12:55:20,832 |-INFO in

Hi Aleksey, yes it was, thank you! It didn't occur to me that this "small problem" leds to automatic status logging, but it makes sense for sure! Is there a way to "redirect" this output to a logfile? The output to stdout confuses my start script and I'd rather have this logback warnings written to a file. thanks again, regards, christian! On Mon, Mar 22, 2010 at 3:03 PM, Aleksey Didik <didik@magenta-technology.ru> wrote:
Look like the reason is this one:
12:55:20,828 |-WARN in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@3a747fa2 - Large window sizes are not allowed. 12:55:20,828 |-WARN in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@3a747fa2 - MaxIndex reduced to 13 12:55:20,832 |-INFO in
Aleksey

Hmm, may be better to reduce MaxIndex to 13? Logback will reduce it automatically anyway, but if you will make it yourself, status messages will not be printed. Hope this help, Aleksey. 22.03.2010 18:13, Christian Migowski пишет:
Hi Aleksey,
yes it was, thank you! It didn't occur to me that this "small problem" leds to automatic status logging, but it makes sense for sure!
Is there a way to "redirect" this output to a logfile? The output to stdout confuses my start script and I'd rather have this logback warnings written to a file.
thanks again, regards, christian!
On Mon, Mar 22, 2010 at 3:03 PM, Aleksey Didik <didik@magenta-technology.ru> wrote:
Look like the reason is this one:
12:55:20,828 |-WARN in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@3a747fa2 - Large window sizes are not allowed. 12:55:20,828 |-WARN in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@3a747fa2 - MaxIndex reduced to 13 12:55:20,832 |-INFO in
Aleksey
_______________________________________________ Logback-user mailing list Logback-user@qos.ch http://qos.ch/mailman/listinfo/logback-user

Yes, I did reduce MaxIndex and that indeed made the status messages on stdout go away, sorry, should have mentioned that. I was just wondering how/if it is possible to log this messages elsewhere than stdout. christian On Mon, Mar 22, 2010 at 3:17 PM, Aleksey Didik <didik@magenta-technology.ru> wrote:
Hmm, may be better to reduce MaxIndex to 13? Logback will reduce it automatically anyway, but if you will make it yourself, status messages will not be printed.
Hope this help, Aleksey.
22.03.2010 18:13, Christian Migowski пишет:
Hi Aleksey,
yes it was, thank you! It didn't occur to me that this "small problem" leds to automatic status logging, but it makes sense for sure!
Is there a way to "redirect" this output to a logfile? The output to stdout confuses my start script and I'd rather have this logback warnings written to a file.
thanks again, regards, christian!
On Mon, Mar 22, 2010 at 3:03 PM, Aleksey Didik <didik@magenta-technology.ru> wrote:
Look like the reason is this one:
12:55:20,828 |-WARN in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@3a747fa2 - Large window sizes are not allowed. 12:55:20,828 |-WARN in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@3a747fa2 - MaxIndex reduced to 13 12:55:20,832 |-INFO in
Aleksey
_______________________________________________ Logback-user mailing list Logback-user@qos.ch http://qos.ch/mailman/listinfo/logback-user
_______________________________________________ Logback-user mailing list Logback-user@qos.ch http://qos.ch/mailman/listinfo/logback-user

Hello Christian, You can register a status listener which will be notified anytime a new status message is created. See [1]. Logback ships with a listener called OnConsoleStatusListener which prints status messages on the console. It is installed as <configuration> <statusListener class="ch.qos.logback.core.status.OnConsoleStatusListener" /> ... the rest of the configuration file </configuration> Its installation is highly recommended. You could fairly easily develop your own listener which writes to a file. HTH, [1] http://logback.qos.ch/manual/configuration.html#statusListener On 22/03/2010 3:21 PM, Christian Migowski wrote:
Yes, I did reduce MaxIndex and that indeed made the status messages on stdout go away, sorry, should have mentioned that. I was just wondering how/if it is possible to log this messages elsewhere than stdout.
christian

Hi Ceki, thanks for your reply, it was very helpful. I did as you wrote, but it seems that the OnConsoleStatusListener is still "registered", messages go still to stdout via this listener, is there a way to "unregister" this listener in the logback.xml config file? I'm new to logback and I am very excited (? begeistert) of all the capabilities and flexibility it offers, it is great! thanks again, regards, christian On Mon, Mar 22, 2010 at 3:47 PM, Ceki Gülcü <ceki@qos.ch> wrote:
Hello Christian,
You can register a status listener which will be notified anytime a new status message is created. See [1]. Logback ships with a listener called OnConsoleStatusListener which prints status messages on the console. It is installed as
<configuration> <statusListener class="ch.qos.logback.core.status.OnConsoleStatusListener" /> ... the rest of the configuration file </configuration>
Its installation is highly recommended. You could fairly easily develop your own listener which writes to a file.
HTH,
[1] http://logback.qos.ch/manual/configuration.html#statusListener

OnConsoleStatusListener is not registered by default. Please also read the section entitled "Automatic printing of status messages in case of warning or errors" in http://logback.qos.ch/manual/configuration.html On 22/03/2010 4:55 PM, Christian Migowski wrote:
Hi Ceki,
thanks for your reply, it was very helpful. I did as you wrote, but it seems that the OnConsoleStatusListener is still "registered", messages go still to stdout via this listener, is there a way to "unregister" this listener in the logback.xml config file?
I'm new to logback and I am very excited (? begeistert) of all the capabilities and flexibility it offers, it is great!
thanks again, regards, christian
On Mon, Mar 22, 2010 at 3:47 PM, Ceki Gülcü<ceki@qos.ch> wrote:
Hello Christian,
You can register a status listener which will be notified anytime a new status message is created. See [1]. Logback ships with a listener called OnConsoleStatusListener which prints status messages on the console. It is installed as
<configuration> <statusListener class="ch.qos.logback.core.status.OnConsoleStatusListener" /> ... the rest of the configuration file </configuration>
Its installation is highly recommended. You could fairly easily develop your own listener which writes to a file.
HTH,
[1] http://logback.qos.ch/manual/configuration.html#statusListener
_______________________________________________ Logback-user mailing list Logback-user@qos.ch http://qos.ch/mailman/listinfo/logback-user

thanks for your reply again, I've read the page before, so that means I cannot "suppress" logback warnings and errors go to stdout, right? The behaviour is reasonable, I just was wondering if it is possible. regards, christian! On Mon, Mar 22, 2010 at 5:00 PM, Ceki Gülcü <ceki@qos.ch> wrote:
OnConsoleStatusListener is not registered by default.
Please also read the section entitled "Automatic printing of status messages in case of warning or errors" in http://logback.qos.ch/manual/configuration.html
On 22/03/2010 4:55 PM, Christian Migowski wrote:
Hi Ceki,
thanks for your reply, it was very helpful. I did as you wrote, but it seems that the OnConsoleStatusListener is still "registered", messages go still to stdout via this listener, is there a way to "unregister" this listener in the logback.xml config file?
I'm new to logback and I am very excited (? begeistert) of all the capabilities and flexibility it offers, it is great!
thanks again, regards, christian
On Mon, Mar 22, 2010 at 3:47 PM, Ceki Gülcü<ceki@qos.ch> wrote:
Hello Christian,
You can register a status listener which will be notified anytime a new status message is created. See [1]. Logback ships with a listener called OnConsoleStatusListener which prints status messages on the console. It is installed as
<configuration> <statusListener class="ch.qos.logback.core.status.OnConsoleStatusListener" /> ... the rest of the configuration file </configuration>
Its installation is highly recommended. You could fairly easily develop your own listener which writes to a file.
HTH,
[1] http://logback.qos.ch/manual/configuration.html#statusListener
_______________________________________________ Logback-user mailing list Logback-user@qos.ch http://qos.ch/mailman/listinfo/logback-user
_______________________________________________ Logback-user mailing list Logback-user@qos.ch http://qos.ch/mailman/listinfo/logback-user
participants (3)
-
Aleksey Didik
-
Ceki Gülcü
-
Christian Migowski