I've got a JGroups setup with more than one JGroups protocol stack (e.g. one for the application server, here JBoss EAP5, and one for a custom application).
I'm looking to set a JGroups's Protocol log Level to a given level, but for a given protocol instance only, not for the global logger. I.e. I want to set the log level but only for a protocol stack, not for the other protocol stack. This is used for debugging of my custom application JGroups protocol stack.
I started to set the log level globally for a given protocol in the logging configuration (log4j), but this is be active for all protocol stacks. Thus, a lot of logging messages are produced.
Then I tried a finer approach: the superclass of all JGroups protocol Protocol
has a method setLevel
which can be used to set the logging level (which can be configured either programatically or through XML configuration file). Since Protocol.setLevel(String)
is available only from JGroups 2.8.0, I isolated the EAR classloader in order to override the JGroups 2.6.20 from the JBoss EAP5 server. But the effect is the same as with the global configuration: the log level is set for all protocol stacks.
Is there a way to configure JGroups logging level for a given Protocol for a given ProtocolStack ? If yes, how to do it ?