You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsif-dev@ws.apache.org by Bill Nagy <na...@watson.ibm.com> on 2003/04/02 17:22:55 UTC

Proposed changes to WSIF logging

Hi.  I'm having difficulties with the WSIF logging code, and so would
like to propose a modification.  If you imbed WSIF into your application
and attempt to do any sort of logging/print debug messages, the current
code makes it difficult to control the amount of information which is
output.  In my particular case, I want to invoke the toString() method
on a WSIFDefaultMessage instance to print out the contents of a message
from within my application.  If I do so with the current codebase, all
that I get is the object identifier from my JVM, which really isn't very
useful.  In order to get more information, I need to set the log level
to DEBUG, which in turn generates volumes of information which I really
don't care about most of the time.

I would propose that we use the INFO log level to help regulate the
information that is output.  In this case, I would like the toString
method to output the message contents if the logging level is set to
INFO.  There may be other instances where this is useful as well, but I
haven't run across them yet.  Attached you will find the modifications
that have I made to the WSIF code to enable this behavior.  I added some
static definitions in Trc to provide a way of specifying the desired
level at which you want information to begin to be logged/output, and
overloaded the brief(...) methods so that the current interfaces would
continue to be supported (to minimize the execution overhead as
indicated in the comments at the top of the file) while also adding an
extra parameter which will be tested against the logging level which is
defined for the application.  I also made a change to the deep(...)
method in WSIFDefaultMessage to take advantage of this.

Attached is the diff with my changes (you may need to strip the CVS junk
out)


-Bill