[logback-user] not finding property file import fromWEB-INF/classes/logback.xml

Dennis Halladay dhalladay at somalogic.com
Tue Aug 24 16:29:11 CEST 2010


I had assumed the CWD (current working directory) of the property import
was relative to the location of logback.xml.
I have determined that the property import is relative to where the
Tomcat JVM started.  For my application this is $TOMCAT_HOME/bin

 -Dennis

-----Original Message-----
From: logback-user-bounces at qos.ch [mailto:logback-user-bounces at qos.ch]
On Behalf Of Dennis Halladay
Sent: Friday, August 20, 2010 11:36 AM
To: logback-user at qos.ch
Subject: [logback-user] not finding property file import
fromWEB-INF/classes/logback.xml

I am using logback in a Tomcat 6/Spring application.

Most of our property files are under WEB-INF.

I am getting the following error trying to import a property file.

11:25:41,110 |-INFO in ch.qos.logback.classic.LoggerContext[default] -
Found resource [logback.xml] at
[file:/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%206.0/we
bapps/PharmaServices/WEB-INF/classes/logback.xml]
11:25:41,449 |-INFO in
ch.qos.logback.classic.joran.action.ConfigurationAction - debug
attribute not set
11:25:41,453 |-ERROR in ch.qos.logback.core.joran.action.PropertyAction
- Could not read properties file [../jdbc.properties].
java.io.FileNotFoundException: ..\jdbc.properties (The system cannot
find the file specified)

logback.xml contains:
<configuration>
  <property file="../jdbc.properties" />

Any suggestions?  What happens once I jar up the contents of classes and
move to the lib directory?
Thanks,
 -Dennis

_______________________________________________
Logback-user mailing list
Logback-user at qos.ch
http://qos.ch/mailman/listinfo/logback-user


More information about the Logback-user mailing list