logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "tsmets@altern.org" <tsm...@yahoo.com>
Subject Re: knowing if log4j has already been initialised
Date Thu, 14 Feb 2002 11:33:04 GMT

You can either reset the Configurator but I would ot advise that solution.
Why don't you add your own factory a parameter where you can mention the
type of theAppender you wanna add ?

Smthg like :
public static Appender Factory.getAppender (Object, APPENDER_TYPE)
{
    // Make it singelton
    // ...
    switch (APPENDER_TYPE)
    {
    case NULL_APPENDER :
        return new NullAppender ();
    case STDOUT_APPENDER :
        return ...;
    case FILE_APPENDER :
        return ...;
    default :
        return NullAppender ();
    }
}


--
Thomas SMETS
rue J. Wytsmanstraat 62
1050 Bruxelles
yahoo-id : smetsthomas
----- Original Message -----
From: "O'Rourke, Frank" <F.ORourke@emuse-tech.com>
To: <log4j-dev@jakarta.apache.org>
Sent: 14 February, 2002 12:16 PM
Subject: knowing if log4j has already been initialised


> Hi
> Is there a way to test is the log4j engine has already been configured.  I
> am using log4j in my application which is running in JBoss + Jetty.  I
wish
> to be able to configure log4j if it has not already been configured by the
> environment that I am executing in.  I access log4j through my own Factory
> with a "public static Category getInstance(String name)" method.
>
> Thanks
>
> --
> To unsubscribe, e-mail:
<mailto:log4j-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:log4j-dev-help@jakarta.apache.org>
>
>



--
To unsubscribe, e-mail:   <mailto:log4j-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:log4j-dev-help@jakarta.apache.org>


Mime
View raw message