You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Marasoiu Nicolae <Ni...@cegeka.com> on 2017/03/13 15:51:20 UTC

using log4j in classloaders and JMX

Hi,


If log4j2 is used in multiple modules, each living in its own classloader, is it possible that all of them are exposed over JMX? If so, what happens to the overlapping keys (paths) ? Is it possible to specify a different JMX root for each one?

Thanks,


Met vriendelijke groeten / Meilleures salutations / Best regards


Nicolae Marasoiu
Agile Developer

[http://signature.cegeka.com/2016/stripe-small.jpg]


E  Nicolae.Marasoiu@cegeka.com<ma...@cegeka.com>


[http://signature.cegeka.com/2016/stripe-large.jpg]


[http://signature.cegeka.com/2016/logo.jpg]     CEGEKA 15-17 Ion Mihalache Blvd. Tower Center Building, 4th,5th,6th,8th,9th fl
RO-011171 Bucharest (RO), Romania
T +40 21 336 20 65
WWW.CEGEKA.COM<http://www.cegeka.com>   [LinkedIn]  <https://www.linkedin.com/company/cegeka-romania>



Re: using log4j in classloaders and JMX

Posted by Remko Popma <re...@gmail.com>.
The Configuration name is not used to register the LoggerContext. 

JMX MBeans for LoggerContext are registered with unique names: their hashcode is appended to the name. The first part of the name depends on what kind of application it is.  I believe that for web apps we try to use a meaningful name from the web context (?). 

Sent from my iPhone

> On Mar 14, 2017, at 1:10, Matt Sicker <bo...@gmail.com> wrote:
> 
> MBeans are named according to the LoggerContext name which I believe is the
> name you give in the <Configuration name="foo"> attribute.
> 
> On 13 March 2017 at 10:51, Marasoiu Nicolae <Ni...@cegeka.com>
> wrote:
> 
>> Hi,
>> 
>> 
>> If log4j2 is used in multiple modules, each living in its own classloader,
>> is it possible that all of them are exposed over JMX? If so, what happens
>> to the overlapping keys (paths) ? Is it possible to specify a different JMX
>> root for each one?
>> 
>> Thanks,
>> 
>> 
>> Met vriendelijke groeten / Meilleures salutations / Best regards
>> 
>> 
>> Nicolae Marasoiu
>> Agile Developer
>> 
>> [http://signature.cegeka.com/2016/stripe-small.jpg]
>> 
>> 
>> E  Nicolae.Marasoiu@cegeka.com<ma...@cegeka.com>
>> 
>> 
>> [http://signature.cegeka.com/2016/stripe-large.jpg]
>> 
>> 
>> [http://signature.cegeka.com/2016/logo.jpg]     CEGEKA 15-17 Ion
>> Mihalache Blvd. Tower Center Building, 4th,5th,6th,8th,9th fl
>> RO-011171 Bucharest (RO), Romania
>> T +40 21 336 20 65
>> WWW.CEGEKA.COM<http://www.cegeka.com>   [LinkedIn]  <
>> https://www.linkedin.com/company/cegeka-romania>
>> 
>> 
>> 
> 
> 
> -- 
> Matt Sicker <bo...@gmail.com>

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: using log4j in classloaders and JMX

Posted by Matt Sicker <bo...@gmail.com>.
MBeans are named according to the LoggerContext name which I believe is the
name you give in the <Configuration name="foo"> attribute.

On 13 March 2017 at 10:51, Marasoiu Nicolae <Ni...@cegeka.com>
wrote:

> Hi,
>
>
> If log4j2 is used in multiple modules, each living in its own classloader,
> is it possible that all of them are exposed over JMX? If so, what happens
> to the overlapping keys (paths) ? Is it possible to specify a different JMX
> root for each one?
>
> Thanks,
>
>
> Met vriendelijke groeten / Meilleures salutations / Best regards
>
>
> Nicolae Marasoiu
> Agile Developer
>
> [http://signature.cegeka.com/2016/stripe-small.jpg]
>
>
> E  Nicolae.Marasoiu@cegeka.com<ma...@cegeka.com>
>
>
> [http://signature.cegeka.com/2016/stripe-large.jpg]
>
>
> [http://signature.cegeka.com/2016/logo.jpg]     CEGEKA 15-17 Ion
> Mihalache Blvd. Tower Center Building, 4th,5th,6th,8th,9th fl
> RO-011171 Bucharest (RO), Romania
> T +40 21 336 20 65
> WWW.CEGEKA.COM<http://www.cegeka.com>   [LinkedIn]  <
> https://www.linkedin.com/company/cegeka-romania>
>
>
>


-- 
Matt Sicker <bo...@gmail.com>