If you need to perform additional configuration on the category factory
itself before it is used to create category instances, you would provide
the following entry:

<categoryFactory class="MyCategoryFactory">
   <param name="property1" value="value1"/>
   <param name="property2" value="value2"/>
</categoryFactory>

Of course, your factory better have Java Bean compliant setters called
property1 and property2.  Things work best when they are string
properties.

Jim Moore wrote:
> 
> You don't specify the factory, but the class itself.
> 
>   <!-- Note the class attributes! -->
>   <category name="category.to.log"
>             class="MyCategory">
>     <priority value ="debug"
>               class="PriorityClass" />
>   </category>
> 
> -----Original Message-----
> From: Yuriy Larin [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, July 08, 2001 7:49 AM
> To: [EMAIL PROTECTED]
> Subject: Is it possible to specify categoryFactory in the XML configuration
> file ?
> Importance: High
> 
> Hi.
> 
> Is it possible to specify categoryFactory parameter in the XML configuration
> file ?
> 
> How to make it, I don't see this ability in the log4j.dtd (1.1.3 version -
> latest) although it's possible in the Property file as in the
> ...\log4j\examples\mycat.good??
> 
> Where is my fault ? I try ...\log4j\examples\MyCategory.java   and
> MyCategoryFactory.java with XML configuration file.
> 
> I get error message:
> log4j:ERROR Did you forget to set the factory in the config file?
> 
> Thanks for any help.
> 
> - Yuriy.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-- 
Beware of bugs in the above code.  I have
only proved it correct, not tried it.
-Don Knuth

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

Reply via email to