Hi all,
Thanks for the help. I fixed it by placing the following in the
l0g4j.properties file:
log4j.appender.R.File=${user.home}/Temp/whatever.log
This seems to work.
Regards,
Sal Gabier
Systems Architect
TIS2Web - New Development
Ph 248-603-4413
Cell 248-425-6985
Affiliated Computer Services
-----Original Message-----
From: Harp, George [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 28, 2007 2:54 PM
To: Log4J Users List
Subject: RE: configuring a log to be written to "c:\documents and
settings\<us erid>\Temp"
Have you tried user.home or user.dir? Java System property? Home probably
what you want
-----Original Message-----
From: Wayne Cannon [mailto:[EMAIL PROTECTED]
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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]