Hi all,

I am using log4j 1.2.8 which I have congifured using the XML configuration. I have defined four category entires in my log file and I have now encountered some unexpected (for me at least) behaviour.

The loggers are configured as follows:

<category name="X" >
  <priority value="debug" />
</category>

<category name="Y" >
  <priority value="debug" />
</category>

<category name="X.Z" >
  <priority value="debug" />
</category>

<category name="Y.Z" >
  <priority value="debug" />
</category>

<root>
  <priority value="INFO"/>
  <appender-ref ref="MyFile"/>
</root>


I have turned the log4j debug output on and it seems that the X and Y and X.Z categories are being created correctly. However according to the debug output the Y.Z logger is not being created as Y.Z but as X.Y.Z.


I can only guess that because X is defined as the parent logger of Z in Category X.Z that log4j is automatically expanding the Y.Z to X.Z because it already thinks that X is an ancestor of X.

Is this the way log4j works and if so why? Can I not define my loggers using the names I have defined above?

Tom

_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail



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



Reply via email to