[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
Mon Sep 12 17:08:53 CDT 2011


branch "master" has been updated
       via  1ac6860fe3206e37cca9adb4745999d874f18a73 (commit)
      from  43bb75fbdf04568405f509920a69f5799722b5f0 (commit)

Summary of changes:
 server/src/ChainedLogOut.cpp               |    2 +-
 server/src/Configuration.cpp               |    4 +-
 server/test/ConfigurationTest.cpp          |    2 -
 server/test/LoggingConfigurationHelper.cpp |   47 +++++++++++++--------------
 4 files changed, 26 insertions(+), 29 deletions(-)


- Log -----------------------------------------------------------------
commit 1ac6860fe3206e37cca9adb4745999d874f18a73
Author: Ken Hunt <ken.hunt at digium.com>
Date:   Mon Sep 12 17:06:06 2011 -0500

    Updates for compiler differences for the formmatted logging support.

diff --git a/server/src/ChainedLogOut.cpp b/server/src/ChainedLogOut.cpp
index 5870602..796be37 100644
--- a/server/src/ChainedLogOut.cpp
+++ b/server/src/ChainedLogOut.cpp
@@ -37,7 +37,7 @@ void ChainedLogOut::logs(const std::string& name, Level logLevel,
 }
 
 std::ostream& ChainedLogOut::logs(std::ostream& out, const std::string& name,
-    Level logLevel, const std::string& message)
+    Level, const std::string& message)
 {
     // date level name(1) message
     std::string::size_type nameStart = name.rfind('.');
diff --git a/server/src/Configuration.cpp b/server/src/Configuration.cpp
index 463b5dd..aabf7a6 100644
--- a/server/src/Configuration.cpp
+++ b/server/src/Configuration.cpp
@@ -375,9 +375,9 @@ void LoggerConfigurationService::removeConfigurationItems(const ConfigurationGro
                 {
                     if (mPriv->mGeneralConfiguration->mOutputFile && mPriv->mGeneralConfiguration->mOutputFile->fileName == fileItem->fileName)
                     {
-                        FileItemIPtr fileItem = mPriv->mGeneralConfiguration->mOutputFile;
+                        FileItemIPtr outputFile = mPriv->mGeneralConfiguration->mOutputFile;
                         mPriv->mGeneralConfiguration->mOutputFile = 0;
-                        mPriv->mServer->removeLogOut(fileItem->mOut);
+                        mPriv->mServer->removeLogOut(outputFile->mOut);
                     }
                 }
                 void visitFormatItem(const FormatItemPtr& formatItem)
diff --git a/server/test/ConfigurationTest.cpp b/server/test/ConfigurationTest.cpp
index 7f1b983..9b3d0eb 100644
--- a/server/test/ConfigurationTest.cpp
+++ b/server/test/ConfigurationTest.cpp
@@ -304,8 +304,6 @@ BOOST_AUTO_TEST_CASE(SetFormat)
     TestBed.confHelper->setFormat(std::string("$t{%Y%m%d %H:%M:%S}: $m: $n,$l"),serial++);
     //time_t Now = time(0);
     lg(Info) << "Informational message 3";
-    Ice::Long pid = (Ice::Long)boost::interprocess::detail::get_current_process_id();
-    // Set format to "logger_name : pid : msg_level : msg"
     TestBed.confHelper->setFormat(std::string("$l : $p : $n : $m"),serial++);
     std::string CurSourceInfo = SRCINFO(" (line=$l:function=$f:source=$sf)");
     lg(Debug) << "Debug message" << CurSourceInfo;
diff --git a/server/test/LoggingConfigurationHelper.cpp b/server/test/LoggingConfigurationHelper.cpp
index 65d47ad..fa03dd7 100644
--- a/server/test/LoggingConfigurationHelper.cpp
+++ b/server/test/LoggingConfigurationHelper.cpp
@@ -41,36 +41,35 @@ public:
      LevelItemPtr mLevelItem;
 
 private:
-    void visitLoggerGeneralGroup(const LoggerGeneralGroupPtr &group)
+    class ItemVisitor : public LoggerConfigurationItemVisitor
     {
-        class ItemVisitor : public LoggerConfigurationItemVisitor
+    public:
+        ItemVisitor() { }
+
+        FileItemPtr mFileItem;
+        FormatItemPtr mFormatItem;
+        LevelItemPtr mLevelItem;
+
+    private:
+        void visitFileItem(const FileItemPtr &fileItem)
         {
-        public:
-            ItemVisitor() { }
-
-            FileItemPtr mFileItem;
-            FormatItemPtr mFormatItem;
-            LevelItemPtr mLevelItem;
-
-        private:
-            void visitFileItem(const FileItemPtr &fileItem)
-            {
-                mFileItem = fileItem;
-            }
-
-            void visitFormatItem(const FormatItemPtr &formatItem)
-            {
-                mFormatItem = formatItem;
-            }
-
-            void visitLevelItem(const LevelItemPtr &levelItem)
-            {
-                mLevelItem = levelItem;
-            }
-        };
-        typedef IceUtil::Handle<ItemVisitor> ItemVisitorPtr;
-
-        ItemVisitorPtr generalVisitor = new ItemVisitor();
+            mFileItem = fileItem;
+        }
+
+        void visitFormatItem(const FormatItemPtr &formatItem)
+        {
+            mFormatItem = formatItem;
+        }
+
+        void visitLevelItem(const LevelItemPtr &levelItem)
+        {
+            mLevelItem = levelItem;
+        }
+    };
+
+    void visitLoggerGeneralGroup(const LoggerGeneralGroupPtr &group)
+    {
+        IceUtil::Handle<LogConfigVisitor::ItemVisitor> generalVisitor = new ItemVisitor();
 
         for (ConfigurationItemDict::const_iterator item = group->configurationItems.begin();
                 item != group->configurationItems.end();

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


-- 
asterisk-scf/release/logger.git



More information about the asterisk-scf-commits mailing list