[logback-user] How to reference file one level above the web context

Dawson Mossman dawsonm at lashpoint.com
Fri Nov 5 21:24:33 CET 2010


I am trying to use the <property file="logback.properties" /> tag in my 
logback.xml file to reference an external settings file.  I want to use 
a relative path and specify the file one level above my application 
context. For example:

<web server root>/apps/myapplication/web-inf/classes/logback.xml

I want to put the logback.properties file at <web server root>/apps/.  
Do you know what relative path I need to use to do this?

I've tried everything I can think of, including the following, but they 
did not work:
<property file="../logback.properties" />
<property file="../../../logback.properties" />
<property file="/logback.properties" />
<property file="./logback.properties" />

Please help ... there has to be a way without using an absolute path!
Dawson


More information about the Logback-user mailing list