[asterisk-scf-commits] asterisk-scf/release/sip.git branch "master" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Fri Nov 11 12:53:53 CST 2011


branch "master" has been updated
       via  96ecfc96638614b5bbe85a9094bc16c0a1cfdf96 (commit)
      from  f9c355bfc60299b4ef25d5375aa53aacc9fee9e8 (commit)

Summary of changes:
 src/AuthManager.cpp        |    2 +-
 src/Component.cpp          |   14 +++++----
 src/PJSipLoggingModule.cpp |   16 +++++-----
 src/PJSipManager.cpp       |    4 +-
 src/PJSipSessionModule.cpp |   72 ++++++++++++++++++++++----------------------
 src/SipEndpoint.cpp        |    8 ++--
 6 files changed, 59 insertions(+), 57 deletions(-)


- Log -----------------------------------------------------------------
commit 96ecfc96638614b5bbe85a9094bc16c0a1cfdf96
Author: Joshua Colp <jcolp at digium.com>
Date:   Fri Nov 11 14:52:46 2011 -0400

    Tweak log levels/messages. (issue ASTSCF-383)

diff --git a/src/AuthManager.cpp b/src/AuthManager.cpp
index 0bd0d15..b5319e3 100644
--- a/src/AuthManager.cpp
+++ b/src/AuthManager.cpp
@@ -163,7 +163,7 @@ bool AuthInstance::authenticate(pjsip_rx_data *rdata)
         case PJSIP_EAUTHINVALIDREALM:
         case PJSIP_EAUTHINVALIDDIGEST:
         default:
-            mImpl->mLogger(Warning) << "Could not auth";
+            mImpl->mLogger(Warning) << "Could not authenticate";
         }
     }
     return false;
diff --git a/src/Component.cpp b/src/Component.cpp
index 84f6837..3f1c5b3 100644
--- a/src/Component.cpp
+++ b/src/Component.cpp
@@ -321,8 +321,9 @@ void Component::listenToStateReplicators()
     }
     catch (const Ice::Exception& e)
     {
-        lg(Error) << e.what();
-        throw;
+        lg(Error) << "Unable to add state replicator listener in " << getName() << BOOST_CURRENT_FUNCTION <<
+            ". Exception: " << e.what();
+        throw; // rethrow
     }
 }
 
@@ -348,8 +349,9 @@ void Component::stopListeningToStateReplicators()
     }
     catch (const Ice::Exception& e)
     {
-        lg(Error) << e.what();
-        throw;
+        lg(Error) << "Unable to remove state replicator listener in " << getName() << BOOST_CURRENT_FUNCTION <<
+            ". Exception: " << e.what();
+        throw; // rethrow
     }
 }
 
@@ -430,7 +432,7 @@ void Component::onPreInitialize()
     }
     catch(const std::exception& e)
     {
-        lg(Critical) << "Major problems in " << getName() << " initialization: " << e.what();
+        lg(Critical) << "Communicator or PJSipManager failure in " << getName() << " initialization: " << e.what();
     }
 }
 
@@ -507,7 +509,7 @@ void Component::onPostInitialize()
     }
     catch(const std::exception& e)
     {
-        lg(Critical) << "Major problems in " << getName() << " initialization: " << e.what();
+        lg(Critical) << "Major PJSIP module failure in " << getName() << " initialization: " << e.what();
     }
 }
 
diff --git a/src/PJSipLoggingModule.cpp b/src/PJSipLoggingModule.cpp
index 6e6a3fb..74b29a2 100644
--- a/src/PJSipLoggingModule.cpp
+++ b/src/PJSipLoggingModule.cpp
@@ -54,29 +54,29 @@ pj_status_t PJSipLoggingModule::unload()
 
 pj_bool_t PJSipLoggingModule::on_rx_request(pjsip_rx_data *rdata)
 {
-    lg(Debug) << "Incoming SIP request" << std::endl;
-    lg(Debug) << rdata->pkt_info.packet << std::endl;
+    lg(Trace) << "Incoming SIP request" << std::endl;
+    lg(Trace) << rdata->pkt_info.packet << std::endl;
     return PJ_FALSE;
 }
 
 pj_bool_t PJSipLoggingModule::on_rx_response(pjsip_rx_data *rdata)
 {
-    lg(Debug) << "Incoming SIP response" << std::endl;
-    lg(Debug) << rdata->pkt_info.packet << std::endl;
+    lg(Trace) << "Incoming SIP response" << std::endl;
+    lg(Trace) << rdata->pkt_info.packet << std::endl;
     return PJ_FALSE;
 }
 
 pj_status_t PJSipLoggingModule::on_tx_request(pjsip_tx_data *tdata)
 {
-    lg(Debug) << "Outgoing SIP request" << std::endl;
-    lg(Debug) << tdata->buf.start << std::endl;
+    lg(Trace) << "Outgoing SIP request" << std::endl;
+    lg(Trace) << tdata->buf.start << std::endl;
     return PJ_SUCCESS;
 }
 
 pj_status_t PJSipLoggingModule::on_tx_response(pjsip_tx_data *tdata)
 {
-    lg(Debug) << "Outgoing SIP response" << std::endl;
-    lg(Debug) << tdata->buf.start << std::endl;
+    lg(Trace) << "Outgoing SIP response" << std::endl;
+    lg(Trace) << tdata->buf.start << std::endl;
     return PJ_SUCCESS;
 }
 
diff --git a/src/PJSipManager.cpp b/src/PJSipManager.cpp
index 6beef79..d5c9c32 100644
--- a/src/PJSipManager.cpp
+++ b/src/PJSipManager.cpp
@@ -289,7 +289,7 @@ PJSipManager::PJSipManager() :
     if (!mMemoryPool)
     {
         const char* message = "Failed to create a memory pool";
-        logger(Error) << message;
+        logger(Critical) << message;
         throw InternalInitializationException(message);
     }
     
@@ -298,7 +298,7 @@ PJSipManager::PJSipManager() :
     if (fail(status))
     {
         const char* message = "Failed to create SIP maintenance thread";
-        logger(Error) << message;
+        logger(Critical) << message;
         throw InternalInitializationException(message);
     }
 }
diff --git a/src/PJSipSessionModule.cpp b/src/PJSipSessionModule.cpp
index 9504d47..275f091 100644
--- a/src/PJSipSessionModule.cpp
+++ b/src/PJSipSessionModule.cpp
@@ -215,78 +215,78 @@ void PJSipSessionModule::replicateState(PJSipDialogModInfo *dlgInfo, PJSipTransa
     SipStateItemSeq setItems;
     Ice::StringSeq removeItems;
 
-    lg(Debug) << "========== Begin State Replication Dump ==========";
+    lg(Trace) << "========== Begin State Replication Dump ==========";
 
     if (dlgInfo)
     {
-        lg(Debug) << "--- Begin Dialog " << dlgInfo->mDialogState->key;
-        lg(Debug) << "Callid: " << dlgInfo->mDialogState->callId;
-        lg(Debug) << "Is Dialog Established: " << dlgInfo->mDialogState->isDialogEstablished;
-        lg(Debug) << "Is Secure: " << dlgInfo->mDialogState->isSecure;
-        lg(Debug) << "Local CSeq: " << dlgInfo->mDialogState->localCSeq;
-        lg(Debug) << "Local URI: " << dlgInfo->mDialogState->localUri;
-	lg(Debug) << "Local tag: " << dlgInfo->mDialogState->localTag;
-        lg(Debug) << "Remote CSeq: " << dlgInfo->mDialogState->remoteCSeq;
-        lg(Debug) << "Remote URI: " << dlgInfo->mDialogState->remoteUri;
-	lg(Debug) << "Remote tag: " << dlgInfo->mDialogState->remoteTag;
-        lg(Debug) << "Transport: " << dlgInfo->mDialogState->transport;
-        lg(Debug) << "UAC Has 2xx: " << dlgInfo->mDialogState->uacHas2xx;
-        lg(Debug) << "Is Uac: " << dlgInfo->mDialogState->isUac;
+        lg(Trace) << "--- Begin Dialog " << dlgInfo->mDialogState->key;
+        lg(Trace) << "Callid: " << dlgInfo->mDialogState->callId;
+        lg(Trace) << "Is Dialog Established: " << dlgInfo->mDialogState->isDialogEstablished;
+        lg(Trace) << "Is Secure: " << dlgInfo->mDialogState->isSecure;
+        lg(Trace) << "Local CSeq: " << dlgInfo->mDialogState->localCSeq;
+        lg(Trace) << "Local URI: " << dlgInfo->mDialogState->localUri;
+	lg(Trace) << "Local tag: " << dlgInfo->mDialogState->localTag;
+        lg(Trace) << "Remote CSeq: " << dlgInfo->mDialogState->remoteCSeq;
+        lg(Trace) << "Remote URI: " << dlgInfo->mDialogState->remoteUri;
+	lg(Trace) << "Remote tag: " << dlgInfo->mDialogState->remoteTag;
+        lg(Trace) << "Transport: " << dlgInfo->mDialogState->transport;
+        lg(Trace) << "UAC Has 2xx: " << dlgInfo->mDialogState->uacHas2xx;
+        lg(Trace) << "Is Uac: " << dlgInfo->mDialogState->isUac;
 	if (dlgInfo->mPending == true)
 	{
-	    lg(Debug) << "Dialog is in pending state, not replicating";
+	    lg(Trace) << "Dialog is in pending state, not replicating";
 	}
         else if (dlgInfo->mNeedsRemoval == true)
         {
-            lg(Debug) << "Removing dialog";
+            lg(Trace) << "Removing dialog";
             removeItems.push_back(dlgInfo->mDialogState->key);
         }
         else if (dlgInfo->mNeedsReplication == true)
         {
-            lg(Debug) << "Replicating dialog";
+            lg(Trace) << "Replicating dialog";
             setItems.push_back(dlgInfo->mDialogState);
             dlgInfo->mNeedsReplication = false;
         }
-        lg(Debug) << "--- End Dialog " << dlgInfo->mDialogState->key;
+        lg(Trace) << "--- End Dialog " << dlgInfo->mDialogState->key;
     }
     if (sessionInfo)
     {
         boost::shared_lock<boost::shared_mutex> lock(sessionInfo->mLock);
-        lg(Debug) << "--- Begin Session " << sessionInfo->mSessionState->key;
-        lg(Debug) << "Endpoint name: " << sessionInfo->mSessionState->endpointName;
-        lg(Debug) << "Session object identity: " << sessionInfo->mSessionState->sessionObjectId.name;
-        lg(Debug) << "Media session object identity: " << sessionInfo->mSessionState->mediaSessionObjectId.name;
+        lg(Trace) << "--- Begin Session " << sessionInfo->mSessionState->key;
+        lg(Trace) << "Endpoint name: " << sessionInfo->mSessionState->endpointName;
+        lg(Trace) << "Session object identity: " << sessionInfo->mSessionState->sessionObjectId.name;
+        lg(Trace) << "Media session object identity: " << sessionInfo->mSessionState->mediaSessionObjectId.name;
 
 	for (RTPMediaSessionDict::const_iterator mediaSession = sessionInfo->mSessionState->rtpMediaSessions.begin();
              mediaSession != sessionInfo->mSessionState->rtpMediaSessions.end();
              ++mediaSession)
         {
-            lg(Debug) << "Media session: " << mediaSession->second;
+            lg(Trace) << "Media session: " << mediaSession->second;
         }
 
-        lg(Debug) << "Bridge: " << sessionInfo->mSessionState->bridge;
-        lg(Debug) << "--- Begin Invite Session " << sessionInfo->mInviteState->key;
-        lg(Debug) << "Current state: " << sessionInfo->mInviteState->currentState;
-        lg(Debug) << "Cancelling: " << sessionInfo->mInviteState->cancelling;
-        lg(Debug) << "Pending cancel: " << sessionInfo->mInviteState->pendingCancel;
-        lg(Debug) << "Cause: " << sessionInfo->mInviteState->cause;
-        lg(Debug) << "Cause text: " << sessionInfo->mInviteState->causeText;
-        lg(Debug) << "Notify: " << sessionInfo->mInviteState->notify;
-        lg(Debug) << "Last Ack CSeq: " << sessionInfo->mInviteState->lastAckCseq;
+        lg(Trace) << "Bridge: " << sessionInfo->mSessionState->bridge;
+        lg(Trace) << "--- Begin Invite Session " << sessionInfo->mInviteState->key;
+        lg(Trace) << "Current state: " << sessionInfo->mInviteState->currentState;
+        lg(Trace) << "Cancelling: " << sessionInfo->mInviteState->cancelling;
+        lg(Trace) << "Pending cancel: " << sessionInfo->mInviteState->pendingCancel;
+        lg(Trace) << "Cause: " << sessionInfo->mInviteState->cause;
+        lg(Trace) << "Cause text: " << sessionInfo->mInviteState->causeText;
+        lg(Trace) << "Notify: " << sessionInfo->mInviteState->notify;
+        lg(Trace) << "Last Ack CSeq: " << sessionInfo->mInviteState->lastAckCseq;
         if (sessionInfo->mNeedsRemoval == true)
         {
             removeItems.push_back(sessionInfo->mInviteState->key);
             removeItems.push_back(sessionInfo->mSessionState->key);
-            lg(Debug) << "Removing session and invite session";
+            lg(Trace) << "Removing session and invite session";
         }
         else if (sessionInfo->mNeedsReplication == true)
         {
             setItems.push_back(sessionInfo->mInviteState);
             setItems.insert(setItems.begin(), sessionInfo->mSessionState);
             sessionInfo->mNeedsReplication = false;
-            lg(Debug) << "Replicating session and invite session";
+            lg(Trace) << "Replicating session and invite session";
         }
-        lg(Debug) << "--- End Session and Invite Session";
+        lg(Trace) << "--- End Session and Invite Session";
     }
     if (tsxInfo)
     {
@@ -300,7 +300,7 @@ void PJSipSessionModule::replicateState(PJSipDialogModInfo *dlgInfo, PJSipTransa
             tsxInfo->mNeedsReplication = false;
         }
     }
-    lg(Debug) << "========== End State Replication Dump ==========";
+    lg(Trace) << "========== End State Replication Dump ==========";
     if (mReplicationContext->isReplicating() == true)
     {
         if (setItems.size() != 0)
diff --git a/src/SipEndpoint.cpp b/src/SipEndpoint.cpp
index 7e5a4ca..7d40d71 100644
--- a/src/SipEndpoint.cpp
+++ b/src/SipEndpoint.cpp
@@ -87,9 +87,9 @@ public:
         return str.str();
     }
 
-    void locateFailureCB(const Ice::Exception&)
+    void locateFailureCB(const Ice::Exception& ex)
     {
-        lg(Error) << "Couldn't locate format " << printFormat();
+        lg(Error) << "Couldn't locate format " << printFormat() << " as exception " << ex.what() << " received";
     }
 
     void getNamedFormatCB(const FormatPtr& format)
@@ -107,7 +107,7 @@ public:
 
     void getNamedFormatFailureCB(const Ice::Exception&)
     {
-        lg(Error) << "getNamedFormat failed for format " << printFormat();
+        lg(Error) << "getNamedFormat failed for format " << printFormat() << " as exception " << ex.what() << " received";
     }
 
     void getDescriptorCB(const SDPDescriptorPtr& descriptor)
@@ -121,7 +121,7 @@ public:
 
     void getDescriptorFailureCB(const Ice::Exception&)
     {
-        lg(Error) << "getDescriptor failed for format " << printFormat();
+        lg(Error) << "getDescriptor failed for format " << printFormat() << " as exception " << ex.what() << " received";
     }
 
     SDPDescriptorServicePrx getDescriptorService()

-----------------------------------------------------------------------


-- 
asterisk-scf/release/sip.git



More information about the asterisk-scf-commits mailing list