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

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


branch "master" has been updated
       via  722e080131e9a32952103bd55bf3243ba3b61fd0 (commit)
      from  4e51c78b3c1b3e58cd792b5cdc9ee84e0897536e (commit)

Summary of changes:
 src/ServiceLocator.cpp           |    6 +++---
 src/ServiceLocatorManagement.cpp |   10 +++++-----
 src/ServiceManagement.cpp        |   12 ++++++------
 3 files changed, 14 insertions(+), 14 deletions(-)


- Log -----------------------------------------------------------------
commit 722e080131e9a32952103bd55bf3243ba3b61fd0
Author: Joshua Colp <jcolp at digium.com>
Date:   Fri Nov 11 14:52:10 2011 -0400

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

diff --git a/src/ServiceLocator.cpp b/src/ServiceLocator.cpp
index b7ec895..2522101 100644
--- a/src/ServiceLocator.cpp
+++ b/src/ServiceLocator.cpp
@@ -215,7 +215,7 @@ void ServiceLocatorApp::start(const string& appName, const Ice::CommunicatorPtr&
             }
             catch (const IceStorm::TopicExists&)
             {
-                lg(Error) << "Oh snap! Race condition creating topic, aborting";
+                lg(Critical) << "Oh snap! Race condition creating topic, aborting";
                 return;
             }
             lg(Info) << "Created service discovery event topic";
@@ -269,12 +269,12 @@ void ServiceLocatorApp::start(const string& appName, const Ice::CommunicatorPtr&
     }
 	catch (const std::exception& e)
     {
-		lg(Info) << "Operating in an active and standalone state since we got an exception: " << e.what() << endl;
+		lg(Warning) << "Operating in an active and standalone state since we got an exception: " << e.what() << endl;
     }
     catch (...)
     {
 	// If we reach this point then no state replicator is present and we are acting in a stand-alone fashion
-	lg(Info) << "Operating in an active and standalone state." << endl;
+	lg(Warning) << "Operating in an active and standalone state." << endl;
     }
 
     lg(Info) << "Activated service discovery management.";
diff --git a/src/ServiceLocatorManagement.cpp b/src/ServiceLocatorManagement.cpp
index 0cfd407..64b15ab 100644
--- a/src/ServiceLocatorManagement.cpp
+++ b/src/ServiceLocatorManagement.cpp
@@ -380,7 +380,7 @@ static string debugPrintParams(const ServiceLocatorParamsPtr& params)
 void ServiceLocatorManagementImpl::locate(const AMD_ServiceLocator_locatePtr& cb,
     const ServiceLocatorParamsPtr& params)
 {
-    lg(Debug) << "locate(" << debugPrintParams(params);
+    lg(Trace) << "locate(" << debugPrintParams(params);
     boost::shared_lock<boost::shared_mutex> lock(mImpl->mLock);
 
     LocateCollectorPtr collector = new LocateOneCollector(cb,
@@ -400,7 +400,7 @@ void ServiceLocatorManagementImpl::locateAll(
     const AMD_ServiceLocator_locateAllPtr& cb,
     const ServiceLocatorParamsPtr& params)
 {
-    lg(Debug) << "locateAll(" << debugPrintParams(params);
+    lg(Trace) << "locateAll(" << debugPrintParams(params);
     boost::shared_lock<boost::shared_mutex> lock(mImpl->mLock);
 
     LocateCollectorPtr collector = new LocateAllCollector(cb,
@@ -487,7 +487,7 @@ ServiceInfo ServiceLocatorManagementImpl::getService(const std::string &guid, co
 void ServiceLocatorManagementImpl::addCompare(const string& guid,
     const ServiceLocatorParamsComparePrx& service, const Ice::Current&)
 {
-    lg(Info) << "addCompare(" << guid << ')';
+    lg(Debug) << "addCompare(" << guid << ')';
     boost::unique_lock<boost::shared_mutex> lock(mImpl->mLock);
 
     pair<map<string, ServiceLocatorParamsComparePrx>::iterator, bool> insertPair =
@@ -509,7 +509,7 @@ void ServiceLocatorManagementImpl::addCompare(const string& guid,
  */
 void ServiceLocatorManagementImpl::removeCompare(const string& guid, const Ice::Current&)
 {
-    lg(Info) << "removeCompare(" << guid << ')';
+    lg(Debug) << "removeCompare(" << guid << ')';
     boost::unique_lock<boost::shared_mutex> lock(mImpl->mLock);
     std::map<std::string, ServiceLocatorParamsComparePrx>::size_type erased = mImpl->mCompares.erase(guid);
 
@@ -574,7 +574,7 @@ void ServiceLocatorManagementImpl::finish_isSupported(
 void ServiceLocatorManagementImpl::removeService(
     const ServiceManagementImplPtr& service)
 {
-    lg(Info) << "removeService(" << service->getGuid() << ')';
+    lg(Debug) << "removeService(" << service->getGuid() << ')';
     boost::unique_lock<boost::shared_mutex> lock(mImpl->mLock);
     for (vector<ServiceManagementImplPtr>::iterator existingService =
              mImpl->mServices.begin();
diff --git a/src/ServiceManagement.cpp b/src/ServiceManagement.cpp
index 2beec01..8434976 100644
--- a/src/ServiceManagement.cpp
+++ b/src/ServiceManagement.cpp
@@ -255,7 +255,7 @@ void ServiceManagementImpl::isSupported(const ServiceLocatorParamsPtr& params, c
      */
     if (mImpl->mStateItem->suspended)
     {
-        lg(Debug) << "  ...isSupported" << debugPrintParams(params) + " = false (suspended)\n";
+        lg(Trace) << "  ...isSupported" << debugPrintParams(params) + " = false (suspended)\n";
         callback->result(false);
         return;
     }
@@ -302,7 +302,7 @@ bool ServiceLocatorParamsSpec::isSupported(const ServiceLocatorParamsPtr& params
         // Is this the wrong category?
         if (mStateItem->params->category != params->category)
         {
-            lg(Debug) << "  ...isSupported" << debugPrintParams(params) + " = false. Different category=" + mStateItem->params->category;
+            lg(Trace) << "  ...isSupported" << debugPrintParams(params) + " = false. Different category=" + mStateItem->params->category;
 
             callback->result(false);
             return false;
@@ -322,7 +322,7 @@ bool ServiceLocatorParamsSpec::isSupported(const ServiceLocatorParamsPtr& params
 
         // Ignore the id and treat this as a wildcard search. 
 
-        lg(Debug) << "  ...isSupported" << debugPrintParams(params) + " = true. Category match explicit, wildcard match service.";
+        lg(Trace) << "  ...isSupported" << debugPrintParams(params) + " = true. Category match explicit, wildcard match service.";
         callback->result(true);
         return true;
     }
@@ -330,7 +330,7 @@ bool ServiceLocatorParamsSpec::isSupported(const ServiceLocatorParamsPtr& params
     // Wrong service?
     if (mStateItem->params->service != params->service)
     {
-        lg(Debug) << "  ...isSupported" << debugPrintParams(params) + " = false. Different service =" + mStateItem->params->service ;
+        lg(Trace) << "  ...isSupported" << debugPrintParams(params) + " = false. Different service =" + mStateItem->params->service ;
         callback->result(false);
         return false;
     }
@@ -341,7 +341,7 @@ bool ServiceLocatorParamsSpec::isSupported(const ServiceLocatorParamsPtr& params
         // Wrong instance?
         if (mStateItem->params->id != params->id)
         {
-            lg(Debug) << "  ...isSupported" << debugPrintParams(params) + " = false. Different id = " + mStateItem->params->id;
+            lg(Trace) << "  ...isSupported" << debugPrintParams(params) + " = false. Different id = " + mStateItem->params->id;
             callback->result(false);
             return false;
         }
@@ -356,7 +356,7 @@ bool ServiceLocatorParamsSpec::isSupported(const ServiceLocatorParamsPtr& params
 
     // If we get here we have a match on service and id. 
     // (and category, if one was passed in.) 
-    lg(Debug) << "  ...isSupported" << debugPrintParams(params) + " = true";
+    lg(Trace) << "  ...isSupported" << debugPrintParams(params) + " = true";
     callback->result(true);
     return true;
 }

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


-- 
asterisk-scf/release/servicediscovery.git



More information about the asterisk-scf-commits mailing list