[prev in list] [next in list] [prev in thread] [next in thread]
List: log4j-user
Subject: Re: Cross-platform File appender paths?
From: Jacob Kjome <hoju () visi ! com>
Date: 2005-10-31 20:59:33
Message-ID: 1130792373.436685b57d782 () my ! visi ! com
[Download RAW message or body]
Quoting Preston CRAWFORD <Preston.Crawford@state.or.us>:
> Just tried that and it didn't work, unfortunately. It through a
> FileNotFoundException during startup of Tomcat.
>
I bet my Halloween candy that the directory, c:/logs/, didn't exist prior to
starting Tomcat. Log4j doesn't create directories if they don't already exist.
I just tried it and it works fine. If said directory does exist, then the
working path for tomcat is not on the same drive as your "logs" directory.
Jake
> Preston
>
> >>> hoju@visi.com 10/28/2005 9:50 PM >>>
> 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
>
>
> ---------------------------------------------------------------------
> 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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic