Openfire3.8.1 Log management

Hi,

Recently shifted from openfire3.6.4 to 3.8.1.

i understabd that the logging configuration has changed and that now log4j is in /lib/ folder.

For my plugins, i have configured the log4j.xml with required appenders for each of the plugin.

Problem: log statements are written into all log files. E.g. say for plugins P1 & P2

now debug statements for both P1 & P2 are being written to P1debug.log & P2debug.log.

Any help on how to cause log4j to write log into respective files alone.

Thanks in advance

perhaps you’ve added all appenders to the configuration?

if use different catagories it should direct log to different places, like:

<level value="DEBUG" /> 
<appender-ref ref="P1debug" />
<level value="DEBUG" /> 
<appender-ref ref="P2debug" />

yes all appenders are added to root.

I did try with category. Issue here is that the category name is to be unique. So i cannot have debug and error levels for the same plugin. i.e. the below order gives an error.

<level value="DEBUG" /> 

<appender-ref ref="P1debug" />
<level value="Error" /> 

<appender-ref ref="P1Error" />

probably should have included earlier. I need log statements of info, debug and error levels to be written for each plugin into different files

then define multiple appenders and apply them to one category

<level value="DEBUG" /> 
<appender-ref ref="P1debug" />
<appender-ref ref="P1info" />
<appender-ref ref="P1warn" />
  ...

and for each appender, define it’s own level through

Tried it.

Some of P1 debug logs are seen in p2’s debug log.

Is there a way wherein log4j can be defined seperately for P1 & P2. It was possible with 3.6.4

I understand that its changed for 3.8.1. there should be something that would help for backward compactibility