logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Harp, George" <GH...@GAINSystems.com>
Subject RE: configuring a log to be written to "c:\documents and settings\<us erid>\Temp"
Date Tue, 28 Aug 2007 18:54:03 GMT
Have you tried user.home or user.dir? Java System property? Home
probably what you want

-----Original Message-----
From: Wayne Cannon [mailto:wcannon@turinnetworks.com] 
Sent: Tuesday, August 28, 2007 1:51 PM
To: Log4J Users List
Subject: Re: configuring a log to be written to "c:\documents and
settings\<us erid>\Temp"

Have you considered using and importing the environment variables, such
as HOME and USERPROFILE (Windows-only).  Yell if you need more pointers.
--Wayne

Gabier, Sal wrote:
> Hello all,
>  
> I am trying to write a logfile to "c:\documents and
settings\<userid>\Temp"
> on a windows machine. The problem I have is that depending on which 
> machine the program is installed on or who logs in, the <userid> 
> directory will change. For instance, if "jsmith" logs in, his log file

> should appear in "c:\documents and settings\jsmith\Temp", but if 
> "jdoe" runs the program from his account, the log should appear in
"c:\documents and settings\jdoe\Temp".
> In my log4j.properties file, I don't know how to make this <userid> a 
> variable. I only know how to hardcode it as follows:
>  
> log4j.appender.R.File=log/whatever.log
>  
> Can anyone help me?
>  
> Regards,
>  
> Sal Gabier
> Systems Architect
> TIS2Web - New Development
> Ph 248-603-4413
> Cell 248-425-6985
> Affiliated Computer Services
>
> ---------------------------------------------------------------------
> 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


Mime
View raw message