Thanks for the help Jin,

  Does this set the Category class for the Hierarchy such that a
Category.getInstance(application.foo) always retrieves an instance
of the com.mycom.log.AppServerCategory class?

PS - Do you set additive = false to disable inheritance and so this
is a like a "user defined root" category.

-Scott







Jin Zhao <[EMAIL PROTECTED]> on 11/28/2001 01:18:17 PM

Please respond to "Log4J Users List" <[EMAIL PROTECTED]>
                                                                            
                                                                            
                                                                            


                                                              
                                                              
                                                              
 To:       Log4J Users List <[EMAIL PROTECTED]>   
                                                              
 cc:       (bcc: Scott Kay/SYBASE)                            
                                                              
                                                              
                                                              
 Subject:  Re: Specifiying another CategoryFactory for        
           DOMConfigurator                                    
                                                              







On Wed, 2001-11-28 at 11:05, [EMAIL PROTECTED] wrote:
>
>
> Could you specify the exact example filename, I have looked around
> extensively in the source but don't see any example of setting a default
> CategoryFactory in an XML config file. (The reason I posted this is
> because I was sure I HAD seen this done in an example somewhere
> but couldn't locate it in the 1.1.3 source on onlince docs.)
>
> Thanks.
> -Scott

Just looked at log4j.dtd in 1.1.3, finding no place to put a
CategoryFactory in.
Also if your AppServerCategory is similar with the examples in 1.1.3,
you may not need to specify the AppServerCategory name, but the class
name of AppServerCategory instead. I have a similar AppServerCategory
with AppServerCategoryFactory embedded inside. I use the following
configuration.

<category name="application"
     class="com.mycom.log.AppServerCategory" additive="false">
     <priority value="info" />
     <appender-ref ref="XXXAppender" />
     <appender-ref ref="YYYAppender" />
</category>

It works.

Jin

--
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