Will Sargent wrote:
I've researched this in the past, and I did find a number of examples
of people using JMX with log4j.  So it's doable.

http://blogs.averconsulting.com/2006/12/13/changing-log4j-logging-levels-dynamically.aspx

http://www.devx.com/Java/Article/32359/1954?pf=true

http://technology.amis.nl/blog/?p=1238

If the JMX code in 1.2.14 is not usable on its own, what does it do?
Is it a starting point?
The JMX code in 1.2.x was usable for /some/ things for /some/ usage scenarios when I tried it. It had some bugs that may have since been fixed, but the lack of support for multiple LoggerRepository's was systemic at that time.

Even if you need multiple LoggerRepository support (which not everyone does), the existing JMX code is a good starting point at least at the code snippet level if not at the class level.

I'm quite happy with my own JMX MBeans for log4j. I looked at how the built-in log4j MBeans did things, but went my own way in a good number of cases and added support for multiple LoggerRepository's. I'd share my MBeans, but my employer wouldn't like that -- and they use other pieces of our JMX framework anyway.

--
Jess Holle

Reply via email to