Where must I call it? Is this ironic? :)
If I call it in my code I get those annoying messages two times!! :)))

There should be a way to avoid the PropertyConfigurator to call
activateOptions() for a particular Appender, so that it can be called inside
the code. That should work. But is there an option for the property file
that tells to the Configurator to NOT call activateOptions for an Appender?

----- Original Message -----
From: "T Master" <[EMAIL PROTECTED]>
To: "Log4J Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, February 20, 2002 4:46 PM
Subject: Re: Use of PropertyConfigurator


> Call :
>
> appender.activateOptions();
>
> :)
>
>
> ----- Original Message -----
> From: "Marco Perrando" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, February 20, 2002 8:44 AM
> Subject: Use of PropertyConfigurator
>
>
> I need to initialize my log4j system by PropertyConfigurator. I need a
> RollingFileAppender, but I know the file name only at runtime (actually
it's
> read from a ServletContext - InitParameter value).
>
> So I call PropertyConfigurator.configure.... and after I set the file
manually
> with
>
>
((RollingFileAppender)Category.getRoot().getAppender("<theAppenderName>")).s
etFi
> le("<theFileName>",true);
>
> Everything goes ok, but I get the annoying WARN message out to the console
>
> log4j:WARN File option not set for appender [<theAppenderName>].
> log4j:WARN Are you using FileAppender instead of ConsoleAppender?
>
> Everytime the servlet initializes the log4j system.
>
> Is there any chance to avoid this annoying message?
> Or even better.
> Is there another way to initialize the RollingFileAppender directly into
the
> properties file, by accessing the InitParameter of my servlet context (IMO
it's
> impossible...)
>
> Thank you!
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


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

Reply via email to