logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James A. N. Stauffer" <stauffer.ja...@gmail.com>
Subject Re: file location - windows vista
Date Tue, 13 Nov 2007 15:55:27 GMT
With an XML config you can access system properties like ${user.home$
}/logfilename.log

On Nov 12, 2007 2:42 PM, epic winter <epicwinter@hotmail.com> wrote:

>
> I have an application using log4j and in the past I have just specified:
> log4j.appender.file.File=logfilename.log
>
> This would create the file in the location where the java app was
> launched.  This was in C:\program files\MyApp\logfilename.log
>
> But windows vista doesn't seem to allow my program to write anywhere in
> c:\program files.  I assume that log file is not being written at all now
> because of these permissions.  Correct?
>
> I guess my solution is to write the log file to a folder in the user's
> home directory.  Is there a way to auto specify the user's home directory
> without hard coding it?
>
> thanks
> -ryan
>
> _________________________________________________________________
> Help yourself to FREE treats served up daily at the Messenger Café. Stop
> by today.
>
> http://www.cafemessenger.com/info/info_sweetstuff2.html?ocid=TXT_TAGLM_OctWLtagline




-- 
James A. N. Stauffer        http://www.geocities.com/stauffer_james/
Are you good? Take the test at http://www.livingwaters.com/good/

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message