[logback-user] About the file location in File appender

Klaus Teller klaus.teller at gmx.net
Tue Aug 18 01:44:47 CEST 2009


That's new to me. I don't recall that log4j is interpreting relative paths this way.  In a web app for instance, I would take "relative" to mean relative to the deployment directory of the application. That is, if my app is deployed in ${TOMCAT_PATH}/webapps/myapp, a my log file my_log.txt would be located precisely in ${TOMCAT_PATH}/webapps/myapp.



-------- Original-Nachricht --------
> Datum: Mon, 17 Aug 2009 15:57:06 -0700
> Von: Ralph Goers <rgoers at apache.org>
> An: logback users list <logback-user at qos.ch>
> Betreff: Re: [logback-user] About the file location in File appender

> Relative paths have to be relative to something. It is almost  
> universal that they will be relative to the path that was the working  
> directory at the time the application was started. So in this respect  
> Logback is just being consistent.  How else would you expect it to  
> behave?
> 
> Ralph
> 
> On Aug 17, 2009, at 3:47 PM, Klaus Teller wrote:
> 
> > Hi,
> >
> > When i use the file appender and specify only the log file's name  
> > (as opposed to absolute path), the log file is created in the  
> > directory from which the application is started.
> >
> > For instance, if i start tomcat from the tomcat bin directory, the  
> > log file is created right there in the bin directory. If i start  
> > tomcat from my home directory, the log file will be created in my  
> > home directory.
> >
> > Is this intentional? If so, can somebody help me understand the  
> > rational?
> >
> > cheers,
> > Klaus.
> >
> > -- 
> > GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
> > Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
> > _______________________________________________
> > Logback-user mailing list
> > Logback-user at qos.ch
> > http://qos.ch/mailman/listinfo/logback-user
> 
> _______________________________________________
> Logback-user mailing list
> Logback-user at qos.ch
> http://qos.ch/mailman/listinfo/logback-user

-- 
Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3 -
sicherer, schneller und einfacher! http://portal.gmx.net/de/go/atbrowser


More information about the Logback-user mailing list