Not sure I have understood your problem exactly, but you could use environment substitution in your properties/xml file.


log4j.appender.XXX.filePath=T:\\LOG\${client_machine}.log


${client.machine} would need to have been set in the system properties before hand.






At 12:04 PM 2/27/2003 +0100, Salou Loic wrote:

Does anyone knows how I can specify dynamically the name of the file ? I
sort of would like the following
- Let Log4j use a property in my config file, likely
"log4j.appender.XXX.filePath=T:\\LOG"
- specify dynamically in my java classes wich filename to use. The reason is
that I am currently developping an application logging messages in files
situated in a shared folder, and I need to give a unique name for each file
(currently I chose to get the client machine name, which is unique)

I can (it already works) subclass RollingFileAppender (or others) and change
the setFile methods, but I would prefer a lot not to override Log4j
behaviors to avoid future diffulties in evoluating with Log4j.

But in the existing parameters I couldn't find anything but the
"log4j.appender.XXX.File=T:\\LOG\\LOGFILE.LOG"...

Please help me !
Thanks


Mr Loïc Salou, eRI Bancaire SA, 4-6 avenue industrielle, 1227 Carouge, GVA NT-Architecture

' +41 22 309 10 46 (int 9246)
@  [EMAIL PROTECTED]



**********************************************************************
 This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**********************************************************************


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]


+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
  donald h. larmee                               [EMAIL PROTECTED]
                                                                         804.301.UTOP
                         utopian software concepts, inc.
                                 www.utopiansoft.com
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to