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

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Fri Apr 1 09:43:55 CDT 2011


branch "master" has been updated
       via  12e7b02ac0de5f2e71591870faca2932525a5984 (commit)
      from  3a5e8dcbb6ebd33be6397971509b59557063f8b8 (commit)

Summary of changes:
 client/src/IceLogger.cpp |   26 ++++++++++++++------------
 1 files changed, 14 insertions(+), 12 deletions(-)


- Log -----------------------------------------------------------------
commit 12e7b02ac0de5f2e71591870faca2932525a5984
Author: Brent Eagles <beagles at digium.com>
Date:   Fri Apr 1 12:13:00 2011 -0230

    Fix compilation error and some formatting issues.

diff --git a/client/src/IceLogger.cpp b/client/src/IceLogger.cpp
index 4f00e07..84ca654 100644
--- a/client/src/IceLogger.cpp
+++ b/client/src/IceLogger.cpp
@@ -48,7 +48,8 @@ void IceLogger::logs(const std::string& name, Level logLevel,
 
     if (!logged)
     {
-        if (!mHasPrintedNoServerNotice) {
+        if (!mHasPrintedNoServerNotice)
+        {
             mHasPrintedNoServerNotice = true;
             std::clog <<
                 "!!! Unable to log to server.  Please check configuration and server status.\n"
@@ -59,13 +60,14 @@ void IceLogger::logs(const std::string& name, Level logLevel,
 }
 
 IceUtil::Handle<ConfiguredIceLogger> ConfiguredIceLogger::create(
-    const LoggingServerPrx& server) {
+    const LoggingServerPrx& server)
+{
     ConfiguredIceLoggerPtr r = new ConfiguredIceLogger(server);
     return r;
 }
 
-IceUtil::Handle<ConfiguredIceLogger> ConfiguredIceLogger::create(
-    const Core::Discovery::V1::ServiceLocatorPrx& locator) {
+IceUtil::Handle<ConfiguredIceLogger> ConfiguredIceLogger::create(const ServiceLocatorPrx& locator)
+{
     // You cannot call updateLoggerFromServiceLocator directly from the ctor.
     // It implicitly creates a ConfiguredIceLoggerPtr for the AMI call.  If the
     // AMI call completes before the ctor complete, then the object will be
@@ -93,11 +95,9 @@ void ConfiguredIceLogger::updateLoggerFromServiceLocator()
         // we must use AMI to free this thread up for servicing requests
         // if this client is used by the service locator itself, a
         // synchronous call to locate would result in a deadlock
-        ServiceLocatorParamsPtr loggingServerParams =
-            new ServiceLocatorParams(LoggingServerCategory);
+        ServiceLocatorParamsPtr loggingServerParams = new ServiceLocatorParams(LoggingServerCategory);
 
-        Ice::CallbackPtr callback = Ice::newCallback(
-            this, &ConfiguredIceLogger::locateFinished);
+        Ice::CallbackPtr callback = Ice::newCallback(this, &ConfiguredIceLogger::locateFinished);
 
         mLocator->begin_locate(loggingServerParams, callback);
     }
@@ -128,8 +128,7 @@ void ConfiguredIceLogger::locateFinished(const Ice::AsyncResultPtr& r)
     }
     catch (const std::exception& e)
     {
-        std::clog << "(Logger) Failed to locate LoggerService: " <<
-            e.what() << '\n';
+        std::clog << "(Logger) Failed to locate LoggerService: " << e.what() << '\n';
         mLogger.setServer(LoggingServerPrx());
     }
 }
@@ -139,11 +138,13 @@ void ConfiguredIceLogger::comparisonRegistered(const std::string& guid,
 {
     // no-op
 }
+
 void ConfiguredIceLogger::comparisonUnregistered(const std::string& guid,
     const Ice::Current&)
 {
     // no-op
 }
+
 void ConfiguredIceLogger::serviceRegistered(const std::string& guid,
     const Ice::Current&)
 {
@@ -152,6 +153,7 @@ void ConfiguredIceLogger::serviceRegistered(const std::string& guid,
         updateLoggerFromServiceLocator();
     }
 }
+
 void ConfiguredIceLogger::serviceUnregistered(const std::string& guid,
     const Ice::Current&)
 {
@@ -160,6 +162,7 @@ void ConfiguredIceLogger::serviceUnregistered(const std::string& guid,
         updateLoggerFromServiceLocator();
     }
 }
+
 void ConfiguredIceLogger::serviceSuspended(const std::string& guid,
     const Ice::Current&)
 {
@@ -168,6 +171,7 @@ void ConfiguredIceLogger::serviceSuspended(const std::string& guid,
         updateLoggerFromServiceLocator();
     }
 }
+
 void ConfiguredIceLogger::serviceUnsuspended(const std::string& guid,
     const Ice::Current&)
 {
@@ -240,7 +244,5 @@ ConfiguredIceLoggerPtr AsteriskSCF::System::Logging::createIceLogger(
         std::clog << "(Logger) TopicManager.Proxy not set.  "
             "Will not receive updates.\n";
     }
-
     return logger;
-
 }

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


-- 
asterisk-scf/release/logger.git



More information about the asterisk-scf-commits mailing list