
[ http://jira.qos.ch/browse/LBCORE-198?page=com.atlassian.jira.plugin.system.i... ] Attila Király updated LBCORE-198: --------------------------------- Attachment: logback-sample.war Attaching an example webapp. It contains a logback.xml in a jar file in the lib folder and an index.jsp that triggers configuration. Deploy it to a servlet container visit index.jsp and watch server log/console. I get this: 19:46:53,818 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy] 19:46:53,818 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml] 19:46:53,819 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [jar:file:/some-path-to/apache-tomcat-7.0.8/webapps/logback-sample/WEB-INF/lib/logback-xml.jar!/logbac 19:46:53,836 |-ERROR in ch.qos.logback.core.joran.spi.ConfigurationWatchList@5f7f259c - URL [jar:file:/some-path-to/apache-tomcat-7.0.8/webapps/logback-sample/WEB-INF/lib/logback-xml.jar!/logback.xml] is not of type file 19:46:53,859 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set 19:46:53,860 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender] 19:46:53,863 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [appender] 19:46:53,902 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to INFO 19:46:53,902 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [appender] to Logger[ROOT]
Logback complains if logback.xml is in a jar --------------------------------------------
Key: LBCORE-198 URL: http://jira.qos.ch/browse/LBCORE-198 Project: logback-core Issue Type: Bug Components: Joran Affects Versions: 0.9.28 Reporter: Attila Király Assignee: Logback dev list Priority: Minor Attachments: logback-sample.war
If logback.xml is not available as a file (for example it is in a jar in the lib folder of a webapp) logback logs an error during configuration. The reason is that in ch.qos.logback.core.joran.spi.ConfigurationWatchList.convertToFile(URL) method it tries to convert the url to file and if it fails it marks this as an error. Imho it should simply silently not do anything in this case.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira