[logback-user] Configuration initialization is too verbose

Ceki Gulcu ceki at qos.ch
Mon Jul 27 11:46:35 CEST 2009


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


More information about the Logback-user mailing list