Ceki Gülcü wrote:

> Koen,
>
> You are probably adding the same appender to a category multiple times.
> Please see the trouble shooting guide.
>
> http://jakarta.apache.org/log4j/docs/TROUBLESHOOT.html#duplicates

Thats true. But its not *me* thats adding the same appender multiple times.
It is the java plugin that executes the 'log4j.properties' file every time
the applet gets loaded.  I as a programmer cannot control this.
An alternative could be to disable the default initialisation precedure and
expicitrly load 'log4j.properties' in the code afer cleaning up all
appenders (using resetConfiguration). But i prefer the default
initialisation procedure. If there exists a way to force a
resetConfiguration before executring the default initialisation, this would
solve my applet problems.

regards,

Koen

>
> Regards, Ceki
>
> At 15:21 22.08.2001 +0200, Koen JANSSENS wrote:
> >We have developped an application that can run stand alone as well as in
> >applet mode. It uses log4j default initialisation (log4j.properties in
> >classpath) to initialize the logging system
> >In stand alone mode, all works fine.
> >The problem occurs when using it as an applet. The first time the applet
> >loads the logger initializes as espected. If for some reason the applet
> >gets reloaded (the user presses the reload button) , the automatic
> >initialisation is performed again (automatically by log4j). The problem
> >is that the 'old' appenders from the first initialisation continue  to
> >exist. This means that every logging statement will be logged twice
> >now.  After another reload, all statements will be logged three time
> >etc.. The only solution to stop this excessive logging is to restart the
> >browser.
> >
> >I wonder if there exist some trick to force the default initialisation
> >procedure to do a cleanup of old appenders before adding the new ones
> >specified in log4j.properties.
> >
> >If you know one , please let me know,
> >
> >Koen.


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

Reply via email to