[EMAIL PROTECTED] wrote:
>   Project     sipXecs
> New Revision  12793 
> <http://sipxecs.sipfoundry.org/ViewVC/sipXecs?view=rev&rev=12793>
> Committer     mranga (M. Ranganathan)
> Date  2008-06-01 09:23:39 -0400 (Sun, 01 Jun 2008)
> 
> 
>     Log
> 
> 
>  Work related to Issue XCF-2510
>  
>  Adds logging to the stack ( should be repackaged into sipx-commons.jar ).
>  Checkstyle fixes applied to the logging classes.
>  Fixes a bug with the NOTIFY. Has been manually tested.
>  
>  
>  

Before I dive into details I have one general comment: sipXconfig is already 
indirectly initializing log4j. By changing log4j.properties we 
can control the format and logging level of nearly each of the ~10 libraries 
that we use. 

Even if jain-sip provides additional methods of initializing log4j I am pretty 
sure that with sipXconfig you do not have to use it. Did you try just to set 
javax.sip related loggers in log4j and see what happens?

Now some comments:

--- a/sipXconfig/neoconf/src/org/sipfoundry/sipxconfig/sip/NotifyMessage.java
+++ b/sipXconfig/neoconf/src/org/sipfoundry/sipxconfig/sip/NotifyMessage.java
@@ -50,7 +50,7 @@ class NotifyMessage extends JainSipMessage {
             clientTx.setApplicationData(tad);
             clientTx.sendRequest();
             EventObject eventObject = tad.block();
-            if (tad.block() == null) {
+            if (eventObject == null) {
                 throw new SipException("Timed out waiting for response");


This is a bug fix unrelated to logging. It should get its own commit.


  * 
+ * @author mranga
+ * 


I ask contributors not to use author tags in sipXconfig. It's the information 
stored in repository already.   After code goes through a set of changes the 
@author info is not real anyway. And no-one should be discouraged from sending 
patches to any part of the code.

When I took your previous patch I split it in 2 parts and did not apply one of 
them. I wanted to take them only after we start using dnsjava. But this commit 
is re-introducing them.
I doubt that was done on purpose. It nearly looks like some files got copied 
from some other place to your subversion repo or did not get merged properly 
after svn up. Unless I hear from you otherwise I'll remove those changes again:

- SipStackBean.java should not reference DomainManagerImpl
- SipServiceImpl.java should not have SipServerImpl


--- a/sipXconfig/web/etc/log4j.properties
+++ b/sipXconfig/web/etc/log4j.properties

+
+log4j.category.javax.sip=debug
+

This is fine for testing. But by committing that you are switching the logging 
level to debug in the production code.

I'll probably move woof's classes related to logging to a separate package. 
Should we use this appender for everything in the log file or just for SIP 
messages?

I am a bit uneasy about using DNS to resolve hostnames - even if it's just for 
logging. sipXconfig already knows what the real hostname is. I'll use that 
instead of Hostname class. I do not have time to package that in a separate 
project at the moment but it's coming.
D.

_______________________________________________
sipx-dev mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipx-dev
Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev

Reply via email to