You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Preston CRAWFORD <Pr...@state.or.us> on 2005/10/29 05:32:33 UTC
Cross-platform File appender paths?
Is this possible? I'd like my log4j.properties to be portable between
Linux and Windows without having to change which one got deployed in ant
or something like that. But I thought I'd ask first. The idea being if
this line...
log4j.appender.File.file=c:/logs/myproject.log
could be turned into something that could be universal to Windows and
Linux/Unix.
Any ideas?
Preston
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
Re: Cross-platform File appender paths?
Posted by Nicolas Gonzalez <ni...@yahoo.com.ar>.
Jacob Kjome escribió:
> At 08:32 PM 10/28/2005 -0700, you wrote:
> >Is this possible? I'd like my log4j.properties to be portable between
> >Linux and Windows without having to change which one got deployed in ant
> >or something like that. But I thought I'd ask first. The idea being if
> >this line...
> >
> >log4j.appender.File.file=c:/logs/myproject.log
> >
>
> Use a Unix-like path. If the working directory of your VM is on the
> "C:" drive, then just do...
>
> log4j.appender.File.file=/logs/myproject.log
>
> the leading "/" will cause Java to look to the root of the current drive.
>
>
> Jake
>
Another thing u can try is to use environment variables such as
"catalina.home" in case u r using Tomcat. (if u use JBoss then read
log4j.xml stored in conf directory (i'm not exactly sure of the
directory...) and u will see the JBoss variable. If u use WebsPhere ..... )
log4j.appender.R.File=${catalina.home}/logs/myproject.log
Nicolas Gonzalez
P.S.: Sorry for my english
> >could be turned into something that could be universal to Windows and
> >Linux/Unix.
> >
> >Any ideas?
> >
> >Preston
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> >For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>
___________________________________________________________
1GB gratis, Antivirus y Antispam
Correo Yahoo!, el mejor correo web del mundo
http://correo.yahoo.com.ar
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
Re: Cross-platform File appender paths?
Posted by Jacob Kjome <ho...@visi.com>.
At 08:32 PM 10/28/2005 -0700, you wrote:
>Is this possible? I'd like my log4j.properties to be portable between
>Linux and Windows without having to change which one got deployed in ant
>or something like that. But I thought I'd ask first. The idea being if
>this line...
>
>log4j.appender.File.file=c:/logs/myproject.log
>
Use a Unix-like path. If the working directory of your VM is on the "C:"
drive, then just do...
log4j.appender.File.file=/logs/myproject.log
the leading "/" will cause Java to look to the root of the current drive.
Jake
>could be turned into something that could be universal to Windows and
>Linux/Unix.
>
>Any ideas?
>
>Preston
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>For additional commands, e-mail: log4j-user-help@logging.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org