The difference can probably be explained as a difference in
LoggerRepositories.  There is a servlet (LogWeb?) that allows config
changes so it migh have some clues to help you.

On 1/19/07, Ostermueller, Erik <[EMAIL PROTECTED]> wrote:


Hello,

I'm writing some code that will turn log4j(1.2.8) logging on and off at
runtime.  I'll probably expose this via jmx.
I've seen solutions out there to re-read a configuration file and this
is not what I want to do.

Instead, I want the code to discover all the loggers in use by my EAR
(deployed under WAS 5.x ) and enable the JMX user to:

-view the list of all loggers
-set the logging levels on any one of the loggers.

Under jonas, this works like a dream.
Invoking myLogger.getLoggerRepository().getCurrentLoggers() unleashes a
gusher of loggers of every variety.
hibernate, struts, betwixt, etc...
I can pick over the results and invoke setLevel() on the ones I care
about.
Logging levels are jumping up and down and the world is a happy place.
Enter WebSphere Application Server 5.x [thunder, lightning, dark
clouds].

With WAS, the getCurrentLoggers() returns just a small subset of all the
loggers in use.
The ones I mentioned above, for instance, are ones that show up in jonas
but not websphere.
The ones in my own package space are there in both jonas and websphere.
So why did some disappear and not others?  Where did they all go?  -- we
use struts and the others equally in both jonas and was.

Using the following WAS add-on (a classloader viewer), I'm probably
going to find my missing loggers.

http://ecommunity.groupintelligence.com/websphere/forums/showthread.php?
p=2353#post2353

My question is, what should I do next if I do find them?
I suppose I'll try to find an api to traverse the classloaders, but that
sounds plain nasty.
Surely someone has done this before.....

I've posted this question on a WebSphere forum and I didn't get as much
as a peep out of them.
http://ecommunity.groupintelligence.com/websphere/forums/showthread.php?
p=2353#post2353

The people who wrote the following doc seem to know what they're talking
about:
http://mattfleming.com/files/active/0/ibm.pdf

I tried their "JCL option 3 + EAR" and unfortunately, the hibernate and
other loggers were still missing.

If anyone thinks it will help, I could post the lists of loggers that
did/didn't show up.

Thanks all,


--Erik Ostermueller


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




--
James Stauffer        http://www.geocities.com/stauffer_james/
Are you good? Take the test at http://www.livingwaters.com/good/

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

Reply via email to