Configuration initialization is too verbose

Hi, When I try running my application that does not log anything I always see the following being dumped to stdout: 17:53:57,102 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml] 17:53:57,102 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [file:/C:/Users/Gili/Documents/jperipheral/java/netbeans/build/classes/logback.xml] 17:53:57,103 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs multiple times on the classpath. 17:53:57,103 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at [file:/C:/Users/Gili/Documents/jperipheral/java/netbeans/build/classes/logback.xml] 17:53:57,103 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at [jar:file:/C:/Users/Gili/Documents/jace/trunk/release/lib/jace.jar!/logback.xml] 17:53:57,155 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set 17:53:57,155 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender] 17:53:57,157 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [RootConsoleAppender] 17:53:57,168 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Pushing component [filter] on top of the object stack. 17:53:57,184 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Pushing component [layout] on top of the object stack. 17:53:57,200 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Popping appender named [RootConsoleAppender] from the object stack 17:53:57,200 |-INFO in ch.qos.logback.classic.joran.action.LevelAction - root level set to WARN 17:53:57,201 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [RootConsoleAppender] to Logger[root] I've got logback.xml in the default package containing: <?xml version="1.0" encoding="UTF-8"?> <configuration> <appender class="ch.qos.logback.core.ConsoleAppender" name="RootConsoleAppender"> <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> <level>warn</level> </filter> <layout class="ch.qos.logback.classic.PatternLayout"> <pattern>%d{yyyy-MM-dd HH:mm:ss},%p,%c,%t %m%n</pattern> </layout> </appender> <root> <level value="warn"/> <appender-ref ref="RootConsoleAppender"/> </root> </configuration> I was under the impression that Logback only outputs this level of verbosity if I set debug="true" in the configuration file, but this isn't the case. Any idea what's causing this? Thanks, Gili -- View this message in context: http://www.nabble.com/Configuration-initialization-is-too-verbose-tp24652550... Sent from the Logback User mailing list archive at Nabble.com.

Hi, The same thing is happening, I was under the impression that, this is the output on the class loading of the JAR by the application server. Then if you had set up the debug=true, when your webapp is loading, it will again output this. Correct me if I m wrong. So, if you have setup logback jar, in each of your webapp (let say 2), then you will have this message output 3 times. But I didn't go too far in the looking for the way to disable it. May be Ceki could help us saying if it s a bug or not. -----Message d'origine----- De : logback-user-bounces@qos.ch [mailto:logback-user-bounces@qos.ch] De la part de cowwoc Envoyé : vendredi 24 juillet 2009 23:59 À : logback-user@qos.ch Objet : [logback-user] Configuration initialization is too verbose Hi, When I try running my application that does not log anything I always see the following being dumped to stdout: 17:53:57,102 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml] 17:53:57,102 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [file:/C:/Users/Gili/Documents/jperipheral/java/netbeans/build/classes/logba ck.xml] 17:53:57,103 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs multiple times on the classpath. 17:53:57,103 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at [file:/C:/Users/Gili/Documents/jperipheral/java/netbeans/build/classes/logba ck.xml] 17:53:57,103 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at [jar:file:/C:/Users/Gili/Documents/jace/trunk/release/lib/jace.jar!/logback. xml] 17:53:57,155 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set 17:53:57,155 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender] 17:53:57,157 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [RootConsoleAppender] 17:53:57,168 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Pushing component [filter] on top of the object stack. 17:53:57,184 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Pushing component [layout] on top of the object stack. 17:53:57,200 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Popping appender named [RootConsoleAppender] from the object stack 17:53:57,200 |-INFO in ch.qos.logback.classic.joran.action.LevelAction - root level set to WARN 17:53:57,201 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [RootConsoleAppender] to Logger[root] I've got logback.xml in the default package containing: <?xml version="1.0" encoding="UTF-8"?> <configuration> <appender class="ch.qos.logback.core.ConsoleAppender" name="RootConsoleAppender"> <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> <level>warn</level> </filter> <layout class="ch.qos.logback.classic.PatternLayout"> <pattern>%d{yyyy-MM-dd HH:mm:ss},%p,%c,%t %m%n</pattern> </layout> </appender> <root> <level value="warn"/> <appender-ref ref="RootConsoleAppender"/> </root> </configuration> I was under the impression that Logback only outputs this level of verbosity if I set debug="true" in the configuration file, but this isn't the case. Any idea what's causing this? Thanks, Gili -- View this message in context: http://www.nabble.com/Configuration-initialization-is-too-verbose-tp24652550 p24652550.html Sent from the Logback User mailing list archive at Nabble.com. _______________________________________________ Logback-user mailing list Logback-user@qos.ch http://qos.ch/mailman/listinfo/logback-user

Hello Gili, In "Chapter 3 - Configuration" [1] under the section entitled "Automatic configuration with logback-test.xml or logback.xml", it is stated that If and only if there are warnings or errors during the parsing of the configuration file, logback will automatically print status data on the console. Since logback.xml is found multiple times on your class path, logback is issuing a warning. HTH, [1] http://logback.qos.ch/manual/configuration.html cowwoc wrote:
Hi,
When I try running my application that does not log anything I always see the following being dumped to stdout:
17:53:57,102 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml] 17:53:57,102 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [file:/C:/Users/Gili/Documents/jperipheral/java/netbeans/build/classes/logback.xml] 17:53:57,103 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs multiple times on the classpath. 17:53:57,103 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at [file:/C:/Users/Gili/Documents/jperipheral/java/netbeans/build/classes/logback.xml] 17:53:57,103 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at [jar:file:/C:/Users/Gili/Documents/jace/trunk/release/lib/jace.jar!/logback.xml] 17:53:57,155 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set 17:53:57,155 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender] 17:53:57,157 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [RootConsoleAppender] 17:53:57,168 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Pushing component [filter] on top of the object stack. 17:53:57,184 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Pushing component [layout] on top of the object stack. 17:53:57,200 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Popping appender named [RootConsoleAppender] from the object stack 17:53:57,200 |-INFO in ch.qos.logback.classic.joran.action.LevelAction - root level set to WARN 17:53:57,201 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [RootConsoleAppender] to Logger[root]
I've got logback.xml in the default package containing:
<?xml version="1.0" encoding="UTF-8"?> <configuration> <appender class="ch.qos.logback.core.ConsoleAppender" name="RootConsoleAppender"> <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> <level>warn</level> </filter> <layout class="ch.qos.logback.classic.PatternLayout"> <pattern>%d{yyyy-MM-dd HH:mm:ss},%p,%c,%t %m%n</pattern> </layout> </appender> <root> <level value="warn"/> <appender-ref ref="RootConsoleAppender"/> </root> </configuration>
I was under the impression that Logback only outputs this level of verbosity if I set debug="true" in the configuration file, but this isn't the case. Any idea what's causing this?
Thanks, Gili
-- Ceki Gülcü Logback: The reliable, generic, fast and flexible logging framework for Java. http://logback.qos.ch

So, the first output is because of errors! Assuming that I used only one place for my jars, and one logback.xml file I got 2 webapps, and the logback.xml has some reference to JNDI vars setup in the webapps descriptors, using InsertFromJNDIAction. So depending on the webapp loaded, the InsertFromJNDIAction will get different value that will change behaviour of what I put inside the config file. This works perfectly well, when it comes to load the webapps, but the first load by the application server, it can't resolve the JNDI variable... so it output an error. How can I prevent this behaviour? -----Message d'origine----- De : logback-user-bounces@qos.ch [mailto:logback-user-bounces@qos.ch] De la part de Ceki Gulcu Envoyé : lundi 27 juillet 2009 11:47 À : logback users list Objet : Re: [logback-user] Configuration initialization is too verbose Hello Gili, In "Chapter 3 - Configuration" [1] under the section entitled "Automatic configuration with logback-test.xml or logback.xml", it is stated that If and only if there are warnings or errors during the parsing of the configuration file, logback will automatically print status data on the console. Since logback.xml is found multiple times on your class path, logback is issuing a warning. HTH, [1] http://logback.qos.ch/manual/configuration.html cowwoc wrote:
Hi,
When I try running my application that does not log anything I always see the following being dumped to stdout:
17:53:57,102 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml] 17:53:57,102 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at
[file:/C:/Users/Gili/Documents/jperipheral/java/netbeans/build/classes/logba ck.xml]
17:53:57,103 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs multiple times on the classpath. 17:53:57,103 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at
[file:/C:/Users/Gili/Documents/jperipheral/java/netbeans/build/classes/logba ck.xml]
17:53:57,103 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at
17:53:57,155 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set 17:53:57,155 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender] 17:53:57,157 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [RootConsoleAppender] 17:53:57,168 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Pushing component [filter] on top of the object stack. 17:53:57,184 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Pushing component [layout] on top of the object stack. 17:53:57,200 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Popping appender named [RootConsoleAppender] from the object stack 17:53:57,200 |-INFO in ch.qos.logback.classic.joran.action.LevelAction - root level set to WARN 17:53:57,201 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction
[jar:file:/C:/Users/Gili/Documents/jace/trunk/release/lib/jace.jar!/logback. xml] -
Attaching appender named [RootConsoleAppender] to Logger[root]
I've got logback.xml in the default package containing:
<?xml version="1.0" encoding="UTF-8"?> <configuration> <appender class="ch.qos.logback.core.ConsoleAppender" name="RootConsoleAppender"> <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> <level>warn</level> </filter> <layout class="ch.qos.logback.classic.PatternLayout"> <pattern>%d{yyyy-MM-dd HH:mm:ss},%p,%c,%t %m%n</pattern> </layout> </appender> <root> <level value="warn"/> <appender-ref ref="RootConsoleAppender"/> </root> </configuration>
I was under the impression that Logback only outputs this level of verbosity if I set debug="true" in the configuration file, but this isn't the case. Any idea what's causing this?
Thanks, Gili
-- Ceki Gülcü Logback: The reliable, generic, fast and flexible logging framework for Java. http://logback.qos.ch _______________________________________________ Logback-user mailing list Logback-user@qos.ch http://qos.ch/mailman/listinfo/logback-user

Ceki, This seems quite reasonable, but I'm wondering what if anything I can do to resolve the warning. If one library depends on another and both use logback, aren't you always going to run into multiple instances of logback.xml? Thanks, Gili Ceki Gulcu wrote:
Hello Gili,
In "Chapter 3 - Configuration" [1] under the section entitled "Automatic configuration with logback-test.xml or logback.xml", it is stated that
If and only if there are warnings or errors during the parsing of the configuration file, logback will automatically print status data on the console.
Since logback.xml is found multiple times on your class path, logback is issuing a warning.
HTH,
[1] http://logback.qos.ch/manual/configuration.html
cowwoc wrote:
Hi,
When I try running my application that does not log anything I always see the following being dumped to stdout:
17:53:57,102 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml] 17:53:57,102 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [file:/C:/Users/Gili/Documents/jperipheral/java/netbeans/build/classes/logback.xml] 17:53:57,103 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs multiple times on the classpath. 17:53:57,103 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at [file:/C:/Users/Gili/Documents/jperipheral/java/netbeans/build/classes/logback.xml] 17:53:57,103 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at [jar:file:/C:/Users/Gili/Documents/jace/trunk/release/lib/jace.jar!/logback.xml] 17:53:57,155 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set 17:53:57,155 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender] 17:53:57,157 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [RootConsoleAppender] 17:53:57,168 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Pushing component [filter] on top of the object stack. 17:53:57,184 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Pushing component [layout] on top of the object stack. 17:53:57,200 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Popping appender named [RootConsoleAppender] from the object stack 17:53:57,200 |-INFO in ch.qos.logback.classic.joran.action.LevelAction - root level set to WARN 17:53:57,201 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [RootConsoleAppender] to Logger[root]
I've got logback.xml in the default package containing:
<?xml version="1.0" encoding="UTF-8"?> <configuration> <appender class="ch.qos.logback.core.ConsoleAppender" name="RootConsoleAppender"> <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> <level>warn</level> </filter> <layout class="ch.qos.logback.classic.PatternLayout"> <pattern>%d{yyyy-MM-dd HH:mm:ss},%p,%c,%t %m%n</pattern> </layout> </appender> <root> <level value="warn"/> <appender-ref ref="RootConsoleAppender"/> </root> </configuration>
I was under the impression that Logback only outputs this level of verbosity if I set debug="true" in the configuration file, but this isn't the case. Any idea what's causing this?
Thanks, Gili
-- Ceki Gülcü Logback: The reliable, generic, fast and flexible logging framework for Java. http://logback.qos.ch _______________________________________________ Logback-user mailing list Logback-user@qos.ch http://qos.ch/mailman/listinfo/logback-user
-- View this message in context: http://www.nabble.com/Configuration-initialization-is-too-verbose-tp24652550... Sent from the Logback User mailing list archive at Nabble.com.

I would say that a library shouldn't be packaged up with a logback.xml (as jace.jar is in your classpath). It's up to the end user of the library what logging output they want from that library, it's not appropriate for the library writer to try and dictate it. Rob On 27 Jul 2009, at 22:46, cowwoc wrote:
Ceki,
This seems quite reasonable, but I'm wondering what if anything I can do to resolve the warning. If one library depends on another and both use logback, aren't you always going to run into multiple instances of logback.xml?
Thanks, Gili

Robert Elliot skrev:
I would say that a library shouldn't be packaged up with a logback.xml (as jace.jar is in your classpath). It's up to the end user of the library what logging output they want from that library, it's not appropriate for the library writer to try and dictate it.
If you need to get rid of such a file, I have found that 7zip is good for editing jar-files directly. Both removing files or editing files in-place (F4). -- Thorbjørn Ravn Andersen "...plus... Tubular Bells!"

Robert Elliot wrote:
I would say that a library shouldn't be packaged up with a logback.xml (as jace.jar is in your classpath). It's up to the end user of the library what logging output they want from that library, it's not appropriate for the library writer to try and dictate it.
Indeed.
Rob
-- Ceki Gülcü Logback: The reliable, generic, fast and flexible logging framework for Java. http://logback.qos.ch

Ah! Good point. Thanks a lot! Gili Ceki Gulcu wrote:
Robert Elliot wrote:
I would say that a library shouldn't be packaged up with a logback.xml (as jace.jar is in your classpath). It's up to the end user of the library what logging output they want from that library, it's not appropriate for the library writer to try and dictate it.
Indeed.
Rob
-- Ceki Gülcü Logback: The reliable, generic, fast and flexible logging framework for Java. http://logback.qos.ch _______________________________________________ Logback-user mailing list Logback-user@qos.ch http://qos.ch/mailman/listinfo/logback-user
-- View this message in context: http://www.nabble.com/Configuration-initialization-is-too-verbose-tp24652550... Sent from the Logback User mailing list archive at Nabble.com.
participants (5)
-
Ceki Gulcu
-
cowwoc
-
Johan Bos
-
Robert Elliot
-
Thorbjoern Ravn Andersen