Hi,

Please see the documentation on PropertyConfigurator. 

At 08:44 08.08.2001 -0700, Jay Riddell wrote:

>Ummmm, ok . . .thanks.  But what do you mean by that ?
>
>I believe that I am trying to set the "variable" called fileName
>in the FileAppender class (but it is not working).
>
>Can anyone be a bit more specific than this ?
>
>
>----- Original Message -----
>From: "Ceki Gülcü" <[EMAIL PROTECTED]>
>To: "LOG4J Users Mailing List" <[EMAIL PROTECTED]>
>Sent: Tuesday, August 07, 2001 10:41 PM
>Subject: Re: Overriding an Xml Configuration's settings
>
>
>
>Jay,
>
>You can use variable substitution. Regards, Ceki
>
>At 19:13 07.08.2001 -0700, Jay Riddell wrote:
>>I'm using XML files to configure Log4j.  All is working fine.
>>
>>I've got a couple of custom priorities, some filters using the
>>FileAppender.  Life was good.
>>
>>Then I discovered that I've got 1 log4j .xml file for EACH of
>>my different executables . . . and the only difference is the
>>filename.
>>
>>Therefore, I tried using a single .xml config file and added
>>something that looks like this (once all the error handling is removed):
>>
>>            Category theRoot = Category.getRoot() ;
>>            Appender theApp = theRoot.getAppender( "MyAppender" ) ;
>>            FileAppender fileApp = (FileAppender) theApp ;
>>            fileApp.setFile( thisExecutablesFileName ) ;
>>
>>But it doesn't work.  If I have a filename set in the xml file, it uses that.
>>If I don't, I get the following:
>>
>>    log4j:WARN File option not set for appender [MyAppender].
>>    log4j:WARN Are you using FileAppender instead of ConsoleAppender?
>>    log4j: Adding appender named [MyAppender] to category [root].
>>    log4j:ERROR No output stream or file set for the appender named [MyAppender].
>>
>>
>>Any ideas how I can use the same .XML file for each of my executables
>>while still configuring each to write to a different output file ?
>>
>>TIA.
>>
>>----------------------------------------------------------------
>>Jay Riddell
>>Dorado Software
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>
>--
>Ceki Gülcü - http://qos.ch
>
>
>---------------------------------------------------------------------
>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]

--
Ceki Gülcü - http://qos.ch


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

Reply via email to