Author |
Message
|
wyatt |
Posted: Wed Jun 18, 2008 1:23 am Post subject: Application Logging from Java Compute Node |
|
|
Voyager
Joined: 28 Nov 2004 Posts: 76
|
What is the best approach for incorporating application logging into a java compute node? We had been using log4j but require that a separate application log file be created for each Message Broker Execution Group. In this instance we have multiple Brokers and Multiple Execution Groups and this becomes cumbersome.
The administration team frowns upon using system log for application logging; e.g. MbService class.
We tried putting application log events to a queue (non-persistent) but results in many messages written to a queue per single input event and slows overall processing.
Any suggestions would be appreciated |
|
Back to top |
|
 |
AkankshA |
Posted: Wed Jun 18, 2008 1:35 am Post subject: |
|
|
 Grand Master
Joined: 12 Jan 2006 Posts: 1494 Location: Singapore
|
are u looking for one log file per broker ... ? or just one file catering for all....
we have used customised jar files to do logging at broker level.... _________________ Cheers |
|
Back to top |
|
 |
wyatt |
Posted: Wed Jun 18, 2008 4:07 am Post subject: |
|
|
Voyager
Joined: 28 Nov 2004 Posts: 76
|
One log per broker or one file for all. Either would work. Just not our existing 8 logs per broker times 4 brokers |
|
Back to top |
|
 |
wyatt |
Posted: Wed Jun 18, 2008 11:47 am Post subject: |
|
|
Voyager
Joined: 28 Nov 2004 Posts: 76
|
Hello
What does
"we have used customised jar files to do logging at broker level...."
mean? What is in the jar files that makes this work |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Jun 18, 2008 7:40 pm Post subject: Re: Application Logging from Java Compute Node |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
wyatt wrote: |
We tried putting application log events to a queue (non-persistent) but results in many messages written to a queue per single input event and slows overall processing.
Any suggestions would be appreciated |
Can you be a little more specific as to why this did not work? I have a hard time understanding how you got multiple messages for the a single input event... (you had to write them... or the message had to be rolled back multiple times...)
And as for slowing the overall processing ... again I do not follow:
Any type of logging will slow down processing. However you can have an asynchronous process pick up the logged messages from the queue and run multi-threaded to your log file(s)
 _________________ MQ & Broker admin |
|
Back to top |
|
 |
wyatt |
Posted: Thu Jun 19, 2008 9:11 am Post subject: |
|
|
Voyager
Joined: 28 Nov 2004 Posts: 76
|
Within our java code (javacompute node) we have many debug statements; e.g. log.info("you are here"); Each WMB Execution Group (JVM) must write to a single file. Different JVMs cannot write to the same file as the file handle gets corrupted.
In our environment we might have 6 WMB Execution Groups and and 4 brokers. This results 24 separate log files.
So, my question is, how do people add log statements to java code in a WMB environment? |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Jun 19, 2008 9:50 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Again... what is wrong with using a logging queue as destination and picking up the messages with an asynchronous process (multi-threaded) to write to your log file?
The actual process reading from the logging queue and writing to the log file can even run outside of the broker...
 _________________ MQ & Broker admin |
|
Back to top |
|
 |
wyatt |
Posted: Thu Jun 19, 2008 10:42 am Post subject: |
|
|
Voyager
Joined: 28 Nov 2004 Posts: 76
|
yes, good point. That approach was tried - this resulted WMB creating core files on AIX WMB V6.0.0.7 (the putting application). We have a PMR open with IBM.
On average we create a 150 log messages per input message, this slows the overall throughput down by approx a factor of 10. Not sure how much of that performance impact is related to the core dumps that are being created or if the writing of these events to a queue is a bad design.
While waiting on IBM I'm looking for other approaches - other experiences. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Jun 19, 2008 10:49 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
wyatt wrote: |
yes, good point. That approach was tried - this resulted WMB creating core files on AIX WMB V6.0.0.7 (the putting application). We have a PMR open with IBM.
On average we create a 150 log messages per input message, this slows the overall throughput down by approx a factor of 10. Not sure how much of that performance impact is related to the core dumps that are being created or if the writing of these events to a queue is a bad design.
While waiting on IBM I'm looking for other approaches - other experiences. |
I think your first problem would need to be addressed with IBM about the core dumps. (Hope you have a PMR open for that).
Next, dare I suggest to reduce logging to bare bones, until you can pinpoint an area that needs more intensive logging.
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|