aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/sip/communicator/impl/protocol
diff options
context:
space:
mode:
authorDamian Minkov <damencho@jitsi.org>2010-12-14 17:13:15 +0000
committerDamian Minkov <damencho@jitsi.org>2010-12-14 17:13:15 +0000
commit3f394899e736b20096d97886551591b9505f1ded (patch)
tree67273c671b5b0a4b96ddc87632499a1e45a955e7 /src/net/java/sip/communicator/impl/protocol
parent20efb21c352be6c984a69977eb473a329337ee58 (diff)
downloadjitsi-3f394899e736b20096d97886551591b9505f1ded.zip
jitsi-3f394899e736b20096d97886551591b9505f1ded.tar.gz
jitsi-3f394899e736b20096d97886551591b9505f1ded.tar.bz2
Add some logging to media service: rtp statistics and media streams info.
Diffstat (limited to 'src/net/java/sip/communicator/impl/protocol')
-rw-r--r--src/net/java/sip/communicator/impl/protocol/sip/ProtocolProviderServiceSipImpl.java7
-rw-r--r--src/net/java/sip/communicator/impl/protocol/sip/SipLogger.java14
-rw-r--r--src/net/java/sip/communicator/impl/protocol/sip/SipRegistrarConnection.java16
3 files changed, 11 insertions, 26 deletions
diff --git a/src/net/java/sip/communicator/impl/protocol/sip/ProtocolProviderServiceSipImpl.java b/src/net/java/sip/communicator/impl/protocol/sip/ProtocolProviderServiceSipImpl.java
index c7e0f0b..6b37ecc 100644
--- a/src/net/java/sip/communicator/impl/protocol/sip/ProtocolProviderServiceSipImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/sip/ProtocolProviderServiceSipImpl.java
@@ -739,8 +739,6 @@ public class ProtocolProviderServiceSipImpl
*/
public void processResponse(ResponseEvent responseEvent)
{
- if (logger.isDebugEnabled())
- logger.debug("received response=\n" + responseEvent.getResponse());
ClientTransaction clientTransaction = responseEvent
.getClientTransaction();
if (clientTransaction == null)
@@ -853,8 +851,6 @@ public class ProtocolProviderServiceSipImpl
}
Request request = transaction.getRequest();
- if (logger.isDebugEnabled())
- logger.debug("Transaction terminated for req=\n" + request);
//find the object that is supposed to take care of responses with the
//corresponding method
@@ -906,9 +902,6 @@ public class ProtocolProviderServiceSipImpl
*/
public void processRequest(RequestEvent requestEvent)
{
- if (logger.isDebugEnabled())
- logger.debug("received request=\n" + requestEvent.getRequest());
-
Request request = requestEvent.getRequest();
// test if an Event header is present and known
diff --git a/src/net/java/sip/communicator/impl/protocol/sip/SipLogger.java b/src/net/java/sip/communicator/impl/protocol/sip/SipLogger.java
index b61c406..8e6387e 100644
--- a/src/net/java/sip/communicator/impl/protocol/sip/SipLogger.java
+++ b/src/net/java/sip/communicator/impl/protocol/sip/SipLogger.java
@@ -239,20 +239,6 @@ public class SipLogger
String status, boolean sender, long time)
{
logPacket(message, sender);
-
- if (!logger.isInfoEnabled())
- return;
-
- String msgHeader;
-
- if(sender)
- msgHeader = "JAIN-SIP sent a message from=\"";
- else
- msgHeader = "JAIN-SIP received a message from=\"";
-
- if (logger.isInfoEnabled())
- logger.info(msgHeader + from + "\" to=\"" + to + "\" at " + time
- + " (status: " + status + "):\n" + message);
}
/**
diff --git a/src/net/java/sip/communicator/impl/protocol/sip/SipRegistrarConnection.java b/src/net/java/sip/communicator/impl/protocol/sip/SipRegistrarConnection.java
index a5580b8..da14cfb 100644
--- a/src/net/java/sip/communicator/impl/protocol/sip/SipRegistrarConnection.java
+++ b/src/net/java/sip/communicator/impl/protocol/sip/SipRegistrarConnection.java
@@ -91,7 +91,7 @@ public class SipRegistrarConnection
ClientTransaction regTrans = null;
/**
- * Option for specifing keep-alive method
+ * Option for specifying keep-alive method
*/
private static final String KEEP_ALIVE_METHOD = "KEEP_ALIVE_METHOD";
@@ -264,8 +264,6 @@ public class SipRegistrarConnection
try
{
regTrans.sendRequest();
- if (logger.isDebugEnabled())
- logger.debug("sent request=\n" + request);
}
//we sometimes get a null pointer exception here so catch them all
catch (Exception ex)
@@ -420,6 +418,10 @@ public class SipRegistrarConnection
//that gives me 3600 even if I request 0).
if (grantedExpiration <= 0 || requestedExpiration <= 0)
{
+ if(logger.isDebugEnabled())
+ logger.debug("Account "
+ + sipProvider.getAccountID().getDisplayName()
+ + " unregistered!");
setRegistrationState(RegistrationState.UNREGISTERED
, RegistrationStateChangeEvent.REASON_USER_REQUEST
, "Registration terminated.");
@@ -464,6 +466,12 @@ public class SipRegistrarConnection
if(headerIter != null && headerIter.hasNext())
updateSupportedOperationSets(headerIter);
+ if(logger.isDebugEnabled()
+ && getRegistrationState().equals(RegistrationState.REGISTERING))
+ logger.debug("Account "
+ + sipProvider.getAccountID().getDisplayName()
+ + " registered!");
+
setRegistrationState(
RegistrationState.REGISTERED
, RegistrationStateChangeEvent.REASON_NOT_SPECIFIED
@@ -567,8 +575,6 @@ public class SipRegistrarConnection
callIdHeader = null;
unregisterTransaction.sendRequest();
- if (logger.isInfoEnabled())
- logger.info("sent request:\n" + unregisterRequest);
//if we're currently registered or in a process of unregistering
//we'll wait for an ok response before changing the status.