The Source for Java Technology Collaboration


How to turn off the verbose logging done in NIST Jain Sip code

If you use the sip ra you will notice relatively verbose DEBUG level log messages from log4j. For example the [SipResourceAdapter] category is frequent. This is however not possible to turn off by introducing a dedicated category in $JBOSS_HOME/server/all/conf/log4j.xml and setting its priority to INFO or higher.

The reason is that the NIST Jain Sip implementation uses a logging api that is not log4j and one of the output channels is System.out. Also, log4j catches and displays what is sent to System.out which makes it impossible to use the log4j.xml for controlling this part of the logging.

To set the logging level for the NIST Jain Sip classes you must instead edit the $[MOBICENTS_HOME]/ra/sipra/ra/src/org/mobicents/slee/resource/sip/sipra.properties file by setting the "gov.nist.javax.sip.TRACE_LEVEL"

to a suitable value. For example 0 swithes all logging off.

-- Main.niklasuhrberg - 04 Jan 2006

If you add the following properties to sipra.properties file:

gov.nist.javax.sip.TRACE_LEVEL=16

gov.nist.javax.sip.SERVER_LOG=sipmessage.txt

This will create a log file of only sip messages (no debug), which can then be used by TracesViewer?. The TracesViewer? program is apart of jain-sip project. You can get the latest from CVS. Good tool that allows me to see the call flow without having the read through the verbose messages.

-- Henry Chin - 12 Jan 2006

[Leon] [added] Another way to control this in the log4j.xml without touching the sipra.properties is using category STDOUT, STDERR to control the output. ex:

Topic MobicentsLoggingLesson . { Edit | Ref-By | Printable | Diffs r3 < r2 < r1 | More }
 XML java.net RSS

Revision r3 - 03 Mar 2006 - 15:25:12 - Main.leondo
Parents: WebHome > MobicentsOpenSLEE