[asterisk-scf-commits] team/dsessions/logger.git branch "master" created.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Wed Jan 19 08:22:55 CST 2011


branch "master" has been created
        at  b4fd8d09b52eee7c0cc552b3612b3b4e41a3c3b6 (commit)

- Log -----------------------------------------------------------------
commit b4fd8d09b52eee7c0cc552b3612b3b4e41a3c3b6
Author: David M. Lee <dlee at digium.com>
Date:   Wed Jan 12 19:06:34 2011 -0600

    Building a single API library.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0fd771d..a3cb69d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -49,14 +49,12 @@ asterisk_scf_component_add_file(logging-client include/AsteriskSCF/Logger/LogOut
 asterisk_scf_component_add_file(logging-client include/AsteriskSCF/Logger/IceLogger.h)
 asterisk_scf_component_add_file(logging-client include/AsteriskSCF/Logger/Level.h)
 
-asterisk_scf_component_add_slice(logging-client LoggerIf)
-asterisk_scf_component_add_slice(logging-client ServiceLocatorIf)
-asterisk_scf_component_add_slice(logging-client ServiceLocatorEventsIf)
-
 asterisk_scf_component_add_boost_libraries(logging-client thread date_time)
 asterisk_scf_add_ice_libraries(IceStorm)
 
+include_directories(${API_INCLUDE_DIR})
 asterisk_scf_component_build_library(logging-client)
+target_link_libraries(logging-client asterisk-scf-api)
 
 install(TARGETS logging-client
     LIBRARY DESTINATION ${ASTERISK_SCF_INSTALL_LIB_DIR}
diff --git a/client/test/CMakeLists.txt b/client/test/CMakeLists.txt
index c5a55fd..57160f2 100644
--- a/client/test/CMakeLists.txt
+++ b/client/test/CMakeLists.txt
@@ -19,18 +19,16 @@ asterisk_scf_component_add_file(logging-client-test client-test.cpp)
 
 asterisk_scf_component_add_boost_libraries(logging-client-test unit_test_framework)
 
-asterisk_scf_component_add_slice(logging-client-test LoggerIf)
-asterisk_scf_component_add_slice(logging-client-test ServiceLocatorIf)
-
+include_directories(${API_INCLUDE_DIR})
 asterisk_scf_component_build_standalone(logging-client-test)
 target_link_libraries(logging-client-test logging-client)
+target_link_libraries(logging-client-test asterisk-scf-api)
 
 boost_add_test(logging-client-test)
 
 asterisk_scf_component_init(scf-log CXX)
 
 asterisk_scf_component_add_file(scf-log scf-log.cpp)
-asterisk_scf_component_add_slice(scf-log LoggerIf)
 
 asterisk_scf_component_add_boost_libraries(scf-log program_options)
 
diff --git a/include/AsteriskSCF/Logger/Level.h b/include/AsteriskSCF/Logger/Level.h
index 0ebcf8a..8c4353a 100644
--- a/include/AsteriskSCF/Logger/Level.h
+++ b/include/AsteriskSCF/Logger/Level.h
@@ -9,7 +9,6 @@
 #pragma once
 
 #include <ostream>
-
 #include <AsteriskSCF/System/Logger/LoggerIf.h>
 
 namespace AsteriskSCF
diff --git a/server/src/CMakeLists.txt b/server/src/CMakeLists.txt
index f43a45e..741a2cb 100644
--- a/server/src/CMakeLists.txt
+++ b/server/src/CMakeLists.txt
@@ -10,9 +10,6 @@ asterisk_scf_component_init(logging-service CXX)
 
 include_directories(../../include)
 
-asterisk_scf_component_add_slice(logging-service LoggerIf)
-asterisk_scf_component_add_slice(logging-service ServiceLocatorIf)
-
 asterisk_scf_component_add_file(logging-service ChainedLogOut.cpp)
 asterisk_scf_component_add_file(logging-service FileChainedLogOut.cpp)
 asterisk_scf_component_add_file(logging-service LoggingServer.cpp)
@@ -27,7 +24,9 @@ asterisk_scf_component_add_file(logging-service LoggingServer.h)
 asterisk_scf_add_ice_libraries(IceStorm)
 asterisk_scf_component_add_boost_libraries(logging-service core)
 
+include_directories(${API_INCLUDE_DIR})
 asterisk_scf_component_build_icebox(logging-service)
+target_link_libraries(logging-service asterisk-scf-api)
 
 install(TARGETS logging-service
     LIBRARY DESTINATION ${ASTERISK_SCF_INSTALL_ICEBOX_DIR}
diff --git a/server/test/CMakeLists.txt b/server/test/CMakeLists.txt
index a7e99e9..86e4a80 100644
--- a/server/test/CMakeLists.txt
+++ b/server/test/CMakeLists.txt
@@ -11,14 +11,14 @@ asterisk_scf_component_init(logging-service-test CXX)
 include_directories(../src)
 include_directories(../../include)
 
-asterisk_scf_component_add_slice(logging-service-test LoggerIf)
-
 asterisk_scf_component_add_file(logging-service-test LoggingServer-test.cpp)
 asterisk_scf_component_add_file(logging-service-test server-test.cpp)
 
 asterisk_scf_component_add_boost_libraries(logging-service-test unit_test_framework)
 
+include_directories(${API_INCLUDE_DIR})
 asterisk_scf_component_build_standalone(logging-service-test)
+target_link_libraries(logging-service-test asterisk-scf-api)
 
 target_link_libraries(logging-service-test logging-service)
 

commit 9e22fb80604367ec8a4e2a5cb85a65f39476ff9b
Author: David M. Lee <dlee at digium.com>
Date:   Thu Jan 13 09:38:37 2011 -0600

    Fixed install bug on Windows.
    
    Note that I'm not sure it installs properly, but it does compile properly.  And that's what's important at this point.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index a8c756f..0fd771d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -58,5 +58,7 @@ asterisk_scf_add_ice_libraries(IceStorm)
 
 asterisk_scf_component_build_library(logging-client)
 
-install(TARGETS logging-client LIBRARY DESTINATION ${ASTERISK_SCF_INSTALL_LIB_DIR})
+install(TARGETS logging-client
+    LIBRARY DESTINATION ${ASTERISK_SCF_INSTALL_LIB_DIR}
+    RUNTIME DESTINATION ${ASTERISK_SCF_INSTALL_ICEBOX_DIR})
 install(DIRECTORY include/ DESTINATION ${ASTERISK_SCF_INSTALL_INCLUDE_DIR})
diff --git a/server/src/CMakeLists.txt b/server/src/CMakeLists.txt
index ecd1605..f43a45e 100644
--- a/server/src/CMakeLists.txt
+++ b/server/src/CMakeLists.txt
@@ -29,6 +29,6 @@ asterisk_scf_component_add_boost_libraries(logging-service core)
 
 asterisk_scf_component_build_icebox(logging-service)
 
-install(TARGETS logging-service LIBRARY DESTINATION ${ASTERISK_SCF_INSTALL_ICEBOX_DIR})
-
-#asterisk_scf_component_install(logging-service RUNTIME bin "Logging Service" System)
+install(TARGETS logging-service
+    LIBRARY DESTINATION ${ASTERISK_SCF_INSTALL_ICEBOX_DIR}
+    RUNTIME DESTINATION ${ASTERISK_SCF_INSTALL_ICEBOX_DIR})

commit 235472332766f44b7db41e9c589e9ab02603a912
Author: David M. Lee <dlee at digium.com>
Date:   Thu Jan 13 00:11:20 2011 -0600

    Revert "Building a single API library."
    
    This reverts commit b1a2cf3110dc9e0d397931af9c6169eee33ebe4d.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index a46eead..a8c756f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -49,12 +49,14 @@ asterisk_scf_component_add_file(logging-client include/AsteriskSCF/Logger/LogOut
 asterisk_scf_component_add_file(logging-client include/AsteriskSCF/Logger/IceLogger.h)
 asterisk_scf_component_add_file(logging-client include/AsteriskSCF/Logger/Level.h)
 
+asterisk_scf_component_add_slice(logging-client LoggerIf)
+asterisk_scf_component_add_slice(logging-client ServiceLocatorIf)
+asterisk_scf_component_add_slice(logging-client ServiceLocatorEventsIf)
+
 asterisk_scf_component_add_boost_libraries(logging-client thread date_time)
 asterisk_scf_add_ice_libraries(IceStorm)
 
-include_directories(${API_INCLUDE_DIR})
 asterisk_scf_component_build_library(logging-client)
-target_link_libraries(logging-client asterisk-scf-api)
 
 install(TARGETS logging-client LIBRARY DESTINATION ${ASTERISK_SCF_INSTALL_LIB_DIR})
 install(DIRECTORY include/ DESTINATION ${ASTERISK_SCF_INSTALL_INCLUDE_DIR})
diff --git a/client/test/CMakeLists.txt b/client/test/CMakeLists.txt
index 57160f2..c5a55fd 100644
--- a/client/test/CMakeLists.txt
+++ b/client/test/CMakeLists.txt
@@ -19,16 +19,18 @@ asterisk_scf_component_add_file(logging-client-test client-test.cpp)
 
 asterisk_scf_component_add_boost_libraries(logging-client-test unit_test_framework)
 
-include_directories(${API_INCLUDE_DIR})
+asterisk_scf_component_add_slice(logging-client-test LoggerIf)
+asterisk_scf_component_add_slice(logging-client-test ServiceLocatorIf)
+
 asterisk_scf_component_build_standalone(logging-client-test)
 target_link_libraries(logging-client-test logging-client)
-target_link_libraries(logging-client-test asterisk-scf-api)
 
 boost_add_test(logging-client-test)
 
 asterisk_scf_component_init(scf-log CXX)
 
 asterisk_scf_component_add_file(scf-log scf-log.cpp)
+asterisk_scf_component_add_slice(scf-log LoggerIf)
 
 asterisk_scf_component_add_boost_libraries(scf-log program_options)
 
diff --git a/include/AsteriskSCF/Logger/Level.h b/include/AsteriskSCF/Logger/Level.h
index 8c4353a..0ebcf8a 100644
--- a/include/AsteriskSCF/Logger/Level.h
+++ b/include/AsteriskSCF/Logger/Level.h
@@ -9,6 +9,7 @@
 #pragma once
 
 #include <ostream>
+
 #include <AsteriskSCF/System/Logger/LoggerIf.h>
 
 namespace AsteriskSCF
diff --git a/server/src/CMakeLists.txt b/server/src/CMakeLists.txt
index 6b896db..ecd1605 100644
--- a/server/src/CMakeLists.txt
+++ b/server/src/CMakeLists.txt
@@ -10,6 +10,9 @@ asterisk_scf_component_init(logging-service CXX)
 
 include_directories(../../include)
 
+asterisk_scf_component_add_slice(logging-service LoggerIf)
+asterisk_scf_component_add_slice(logging-service ServiceLocatorIf)
+
 asterisk_scf_component_add_file(logging-service ChainedLogOut.cpp)
 asterisk_scf_component_add_file(logging-service FileChainedLogOut.cpp)
 asterisk_scf_component_add_file(logging-service LoggingServer.cpp)
@@ -24,8 +27,8 @@ asterisk_scf_component_add_file(logging-service LoggingServer.h)
 asterisk_scf_add_ice_libraries(IceStorm)
 asterisk_scf_component_add_boost_libraries(logging-service core)
 
-include_directories(${API_INCLUDE_DIR})
 asterisk_scf_component_build_icebox(logging-service)
-target_link_libraries(logging-service asterisk-scf-api)
 
 install(TARGETS logging-service LIBRARY DESTINATION ${ASTERISK_SCF_INSTALL_ICEBOX_DIR})
+
+#asterisk_scf_component_install(logging-service RUNTIME bin "Logging Service" System)
diff --git a/server/test/CMakeLists.txt b/server/test/CMakeLists.txt
index 86e4a80..a7e99e9 100644
--- a/server/test/CMakeLists.txt
+++ b/server/test/CMakeLists.txt
@@ -11,14 +11,14 @@ asterisk_scf_component_init(logging-service-test CXX)
 include_directories(../src)
 include_directories(../../include)
 
+asterisk_scf_component_add_slice(logging-service-test LoggerIf)
+
 asterisk_scf_component_add_file(logging-service-test LoggingServer-test.cpp)
 asterisk_scf_component_add_file(logging-service-test server-test.cpp)
 
 asterisk_scf_component_add_boost_libraries(logging-service-test unit_test_framework)
 
-include_directories(${API_INCLUDE_DIR})
 asterisk_scf_component_build_standalone(logging-service-test)
-target_link_libraries(logging-service-test asterisk-scf-api)
 
 target_link_libraries(logging-service-test logging-service)
 

commit b1a2cf3110dc9e0d397931af9c6169eee33ebe4d
Author: David M. Lee <dlee at digium.com>
Date:   Wed Jan 12 19:06:34 2011 -0600

    Building a single API library.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index a8c756f..a46eead 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -49,14 +49,12 @@ asterisk_scf_component_add_file(logging-client include/AsteriskSCF/Logger/LogOut
 asterisk_scf_component_add_file(logging-client include/AsteriskSCF/Logger/IceLogger.h)
 asterisk_scf_component_add_file(logging-client include/AsteriskSCF/Logger/Level.h)
 
-asterisk_scf_component_add_slice(logging-client LoggerIf)
-asterisk_scf_component_add_slice(logging-client ServiceLocatorIf)
-asterisk_scf_component_add_slice(logging-client ServiceLocatorEventsIf)
-
 asterisk_scf_component_add_boost_libraries(logging-client thread date_time)
 asterisk_scf_add_ice_libraries(IceStorm)
 
+include_directories(${API_INCLUDE_DIR})
 asterisk_scf_component_build_library(logging-client)
+target_link_libraries(logging-client asterisk-scf-api)
 
 install(TARGETS logging-client LIBRARY DESTINATION ${ASTERISK_SCF_INSTALL_LIB_DIR})
 install(DIRECTORY include/ DESTINATION ${ASTERISK_SCF_INSTALL_INCLUDE_DIR})
diff --git a/client/test/CMakeLists.txt b/client/test/CMakeLists.txt
index c5a55fd..57160f2 100644
--- a/client/test/CMakeLists.txt
+++ b/client/test/CMakeLists.txt
@@ -19,18 +19,16 @@ asterisk_scf_component_add_file(logging-client-test client-test.cpp)
 
 asterisk_scf_component_add_boost_libraries(logging-client-test unit_test_framework)
 
-asterisk_scf_component_add_slice(logging-client-test LoggerIf)
-asterisk_scf_component_add_slice(logging-client-test ServiceLocatorIf)
-
+include_directories(${API_INCLUDE_DIR})
 asterisk_scf_component_build_standalone(logging-client-test)
 target_link_libraries(logging-client-test logging-client)
+target_link_libraries(logging-client-test asterisk-scf-api)
 
 boost_add_test(logging-client-test)
 
 asterisk_scf_component_init(scf-log CXX)
 
 asterisk_scf_component_add_file(scf-log scf-log.cpp)
-asterisk_scf_component_add_slice(scf-log LoggerIf)
 
 asterisk_scf_component_add_boost_libraries(scf-log program_options)
 
diff --git a/include/AsteriskSCF/Logger/Level.h b/include/AsteriskSCF/Logger/Level.h
index 0ebcf8a..8c4353a 100644
--- a/include/AsteriskSCF/Logger/Level.h
+++ b/include/AsteriskSCF/Logger/Level.h
@@ -9,7 +9,6 @@
 #pragma once
 
 #include <ostream>
-
 #include <AsteriskSCF/System/Logger/LoggerIf.h>
 
 namespace AsteriskSCF
diff --git a/server/src/CMakeLists.txt b/server/src/CMakeLists.txt
index ecd1605..6b896db 100644
--- a/server/src/CMakeLists.txt
+++ b/server/src/CMakeLists.txt
@@ -10,9 +10,6 @@ asterisk_scf_component_init(logging-service CXX)
 
 include_directories(../../include)
 
-asterisk_scf_component_add_slice(logging-service LoggerIf)
-asterisk_scf_component_add_slice(logging-service ServiceLocatorIf)
-
 asterisk_scf_component_add_file(logging-service ChainedLogOut.cpp)
 asterisk_scf_component_add_file(logging-service FileChainedLogOut.cpp)
 asterisk_scf_component_add_file(logging-service LoggingServer.cpp)
@@ -27,8 +24,8 @@ asterisk_scf_component_add_file(logging-service LoggingServer.h)
 asterisk_scf_add_ice_libraries(IceStorm)
 asterisk_scf_component_add_boost_libraries(logging-service core)
 
+include_directories(${API_INCLUDE_DIR})
 asterisk_scf_component_build_icebox(logging-service)
+target_link_libraries(logging-service asterisk-scf-api)
 
 install(TARGETS logging-service LIBRARY DESTINATION ${ASTERISK_SCF_INSTALL_ICEBOX_DIR})
-
-#asterisk_scf_component_install(logging-service RUNTIME bin "Logging Service" System)
diff --git a/server/test/CMakeLists.txt b/server/test/CMakeLists.txt
index a7e99e9..86e4a80 100644
--- a/server/test/CMakeLists.txt
+++ b/server/test/CMakeLists.txt
@@ -11,14 +11,14 @@ asterisk_scf_component_init(logging-service-test CXX)
 include_directories(../src)
 include_directories(../../include)
 
-asterisk_scf_component_add_slice(logging-service-test LoggerIf)
-
 asterisk_scf_component_add_file(logging-service-test LoggingServer-test.cpp)
 asterisk_scf_component_add_file(logging-service-test server-test.cpp)
 
 asterisk_scf_component_add_boost_libraries(logging-service-test unit_test_framework)
 
+include_directories(${API_INCLUDE_DIR})
 asterisk_scf_component_build_standalone(logging-service-test)
+target_link_libraries(logging-service-test asterisk-scf-api)
 
 target_link_libraries(logging-service-test logging-service)
 

commit 509b8256e8359e227a83c6b3afd25348e1c7d532
Author: David M. Lee <dlee at digium.com>
Date:   Mon Jan 10 14:03:45 2011 -0600

    Install

diff --git a/CMakeLists.txt b/CMakeLists.txt
index edd81ec..a8c756f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -57,3 +57,6 @@ asterisk_scf_component_add_boost_libraries(logging-client thread date_time)
 asterisk_scf_add_ice_libraries(IceStorm)
 
 asterisk_scf_component_build_library(logging-client)
+
+install(TARGETS logging-client LIBRARY DESTINATION ${ASTERISK_SCF_INSTALL_LIB_DIR})
+install(DIRECTORY include/ DESTINATION ${ASTERISK_SCF_INSTALL_INCLUDE_DIR})
diff --git a/server/src/CMakeLists.txt b/server/src/CMakeLists.txt
index 0826d82..ecd1605 100644
--- a/server/src/CMakeLists.txt
+++ b/server/src/CMakeLists.txt
@@ -29,4 +29,6 @@ asterisk_scf_component_add_boost_libraries(logging-service core)
 
 asterisk_scf_component_build_icebox(logging-service)
 
+install(TARGETS logging-service LIBRARY DESTINATION ${ASTERISK_SCF_INSTALL_ICEBOX_DIR})
+
 #asterisk_scf_component_install(logging-service RUNTIME bin "Logging Service" System)

commit 95463f62b2aa228f58b4583016833bbd3b5a2cc9
Author: David M. Lee <dlee at digium.com>
Date:   Wed Jan 12 18:30:34 2011 -0600

    Fixed slice #includes

diff --git a/include/AsteriskSCF/Logger/IceLogger.h b/include/AsteriskSCF/Logger/IceLogger.h
index a3ee3f7..cc74d06 100644
--- a/include/AsteriskSCF/Logger/IceLogger.h
+++ b/include/AsteriskSCF/Logger/IceLogger.h
@@ -10,8 +10,8 @@
 
 #include <Ice/Ice.h>
 
-#include "Core/Discovery/ServiceLocatorIf.h"
-#include "Core/Discovery/ServiceLocatorEventsIf.h"
+#include <AsteriskSCF/Core/Discovery/ServiceLocatorIf.h>
+#include <AsteriskSCF/Core/Discovery/ServiceLocatorEventsIf.h>
 #include "LogOut.h"
 
 namespace AsteriskSCF
diff --git a/include/AsteriskSCF/Logger/Level.h b/include/AsteriskSCF/Logger/Level.h
index e735bdf..0ebcf8a 100644
--- a/include/AsteriskSCF/Logger/Level.h
+++ b/include/AsteriskSCF/Logger/Level.h
@@ -10,7 +10,7 @@
 
 #include <ostream>
 
-#include "System/Logger/LoggerIf.h"
+#include <AsteriskSCF/System/Logger/LoggerIf.h>
 
 namespace AsteriskSCF
 {

commit 343eb5a60b09417f4ba706445373fabfd9040b8f
Merge: 3c13b6d 554326a
Author: Ken Hunt <ken.hunt at digium.com>
Date:   Fri Jan 7 15:02:21 2011 -0600

    Merge branch 'master' of git.asterisk.org:asterisk-scf/release/logger


commit 3c13b6d094c74285cd6c4fd35482853290943288
Author: Ken Hunt <ken.hunt at digium.com>
Date:   Fri Jan 7 14:54:42 2011 -0600

    Adjust #includes to use <> and prefix paths with AsteriskSCF.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 72fbec5..edd81ec 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -27,4 +27,33 @@ else()
 endif()
 
 add_subdirectory(server)
-add_subdirectory(client)
+add_subdirectory(client) # For the client test directory.
+
+
+# The client component is built here, so as to be able to add files
+# from both src and include directories.
+
+asterisk_scf_component_init(logging-client CXX)
+
+include_directories(include)
+
+asterisk_scf_component_add_file(logging-client client/src/Logger.cpp)
+asterisk_scf_component_add_file(logging-client client/src/LoggerFactory.cpp)
+asterisk_scf_component_add_file(logging-client client/src/LogOut.cpp)
+asterisk_scf_component_add_file(logging-client client/src/IceConfigurator.cpp)
+asterisk_scf_component_add_file(logging-client client/src/IceLogger.cpp)
+asterisk_scf_component_add_file(logging-client client/src/OstreamLogger.cpp)
+asterisk_scf_component_add_file(logging-client client/src/IceConfigurator.h)
+asterisk_scf_component_add_file(logging-client include/AsteriskSCF/logger.h)
+asterisk_scf_component_add_file(logging-client include/AsteriskSCF/Logger/LogOut.h)
+asterisk_scf_component_add_file(logging-client include/AsteriskSCF/Logger/IceLogger.h)
+asterisk_scf_component_add_file(logging-client include/AsteriskSCF/Logger/Level.h)
+
+asterisk_scf_component_add_slice(logging-client LoggerIf)
+asterisk_scf_component_add_slice(logging-client ServiceLocatorIf)
+asterisk_scf_component_add_slice(logging-client ServiceLocatorEventsIf)
+
+asterisk_scf_component_add_boost_libraries(logging-client thread date_time)
+asterisk_scf_add_ice_libraries(IceStorm)
+
+asterisk_scf_component_build_library(logging-client)
diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt
index 6b2ef65..b38354d 100644
--- a/client/CMakeLists.txt
+++ b/client/CMakeLists.txt
@@ -6,5 +6,4 @@
 # All rights reserved.
 #
 
-add_subdirectory(src)
 add_subdirectory(test)
diff --git a/client/src/CMakeLists.txt b/client/src/CMakeLists.txt
deleted file mode 100644
index cdf9c90..0000000
--- a/client/src/CMakeLists.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# Asterisk Scalable Communications Framework
-#
-# Copyright (C) 2010 -- Digium, Inc.
-#
-# All rights reserved.
-#
-
-asterisk_scf_component_init(logging-client CXX)
-
-include_directories(../../common)
-
-asterisk_scf_component_add_file(logging-client Logger.cpp)
-asterisk_scf_component_add_file(logging-client LoggerFactory.cpp)
-asterisk_scf_component_add_file(logging-client LogOut.cpp)
-asterisk_scf_component_add_file(logging-client IceConfigurator.cpp)
-asterisk_scf_component_add_file(logging-client IceLogger.cpp)
-asterisk_scf_component_add_file(logging-client OstreamLogger.cpp)
-asterisk_scf_component_add_file(logging-client logger.h)
-asterisk_scf_component_add_file(logging-client IceConfigurator.h)
-asterisk_scf_component_add_file(logging-client LogOut.h)
-
-asterisk_scf_component_add_slice(logging-client LoggerIf)
-asterisk_scf_component_add_slice(logging-client ServiceLocatorIf)
-asterisk_scf_component_add_slice(logging-client ServiceLocatorEventsIf)
-
-asterisk_scf_component_add_boost_libraries(logging-client thread date_time)
-asterisk_scf_add_ice_libraries(IceStorm)
-
-asterisk_scf_component_build_library(logging-client)
diff --git a/client/src/IceConfigurator.h b/client/src/IceConfigurator.h
index 5a5d032..1742cb0 100644
--- a/client/src/IceConfigurator.h
+++ b/client/src/IceConfigurator.h
@@ -16,7 +16,7 @@
 
 #pragma once
 
-#include "logger.h"
+#include <AsteriskSCF/logger.h>
 
 namespace AsteriskSCF
 {
diff --git a/client/src/IceLogger.cpp b/client/src/IceLogger.cpp
index 2a67f4b..42622c6 100644
--- a/client/src/IceLogger.cpp
+++ b/client/src/IceLogger.cpp
@@ -16,10 +16,10 @@
 
 #include <IceStorm/IceStorm.h>
 
-#include "Core/Discovery/ServiceLocatorIf.h"
+#include <AsteriskSCF/Core/Discovery/ServiceLocatorIf.h>
 
-#include "IceLogger.h"
-#include "Level.h"
+#include <AsteriskSCF/Logger/IceLogger.h>
+#include <AsteriskSCF/Logger/Level.h>
 
 using namespace AsteriskSCF::Core::Discovery::V1;
 using namespace AsteriskSCF::System::Logging;
diff --git a/client/src/LogOut.cpp b/client/src/LogOut.cpp
index 7f361bb..b8a3d4a 100644
--- a/client/src/LogOut.cpp
+++ b/client/src/LogOut.cpp
@@ -14,7 +14,7 @@
  * at the top of the source tree.
  */
 
-#include "LogOut.h"
+#include <AsteriskSCF/Logger/LogOut.h>
 
 using namespace AsteriskSCF::System::Logging;
 
diff --git a/client/src/Logger.cpp b/client/src/Logger.cpp
index c1403e3..bd56c19 100644
--- a/client/src/Logger.cpp
+++ b/client/src/Logger.cpp
@@ -17,7 +17,7 @@
 #include <cassert>
 #include <cstdio>
 
-#include "logger.h"
+#include <AsteriskSCF/logger.h>
 
 using namespace AsteriskSCF::System::Logging;
 
diff --git a/client/src/LoggerFactory.cpp b/client/src/LoggerFactory.cpp
index 0b1e845..3ad3c42 100644
--- a/client/src/LoggerFactory.cpp
+++ b/client/src/LoggerFactory.cpp
@@ -24,7 +24,7 @@
 
 #include <boost/algorithm/string/split.hpp>
 #include <boost/thread/once.hpp>
-#include "logger.h"
+#include <AsteriskSCF/logger.h>
 
 using namespace AsteriskSCF::System::Logging;
 using namespace boost::algorithm;
diff --git a/client/src/OstreamLogger.cpp b/client/src/OstreamLogger.cpp
index a1f8076..d3b35c6 100644
--- a/client/src/OstreamLogger.cpp
+++ b/client/src/OstreamLogger.cpp
@@ -14,7 +14,7 @@
  * at the top of the source tree.
  */
 
-#include "logger.h"
+#include <AsteriskSCF/logger.h>
 
 using namespace AsteriskSCF::System::Logging;
 
diff --git a/client/test/CMakeLists.txt b/client/test/CMakeLists.txt
index e52affb..c5a55fd 100644
--- a/client/test/CMakeLists.txt
+++ b/client/test/CMakeLists.txt
@@ -9,7 +9,7 @@
 asterisk_scf_component_init(logging-client-test CXX)
 
 include_directories(../src)
-include_directories(../../common)
+include_directories(../../include)
 
 asterisk_scf_component_add_file(logging-client-test Logger-test.cpp)
 asterisk_scf_component_add_file(logging-client-test LoggerFactory-test.cpp)
diff --git a/client/test/ExpectedLogOut.h b/client/test/ExpectedLogOut.h
index 1c964f7..2fdcb02 100644
--- a/client/test/ExpectedLogOut.h
+++ b/client/test/ExpectedLogOut.h
@@ -8,7 +8,7 @@
 
 #pragma once
 
-#include "logger.h"
+#include <AsteriskSCF/logger.h>
 
 namespace AsteriskSCF
 {
diff --git a/client/test/LogBuf-test.cpp b/client/test/LogBuf-test.cpp
index 8d035f3..845f5f6 100644
--- a/client/test/LogBuf-test.cpp
+++ b/client/test/LogBuf-test.cpp
@@ -17,7 +17,7 @@
 
 #include <boost/test/unit_test.hpp>
 
-#include "logger.h"
+#include <AsteriskSCF/logger.h>
 #include "ExpectedLogOut.h"
 
 using namespace AsteriskSCF::System::Logging;
diff --git a/client/test/Logger-test.cpp b/client/test/Logger-test.cpp
index dc8fea6..0964c6f 100644
--- a/client/test/Logger-test.cpp
+++ b/client/test/Logger-test.cpp
@@ -16,7 +16,7 @@
 
 #include <boost/test/unit_test.hpp>
 
-#include "logger.h"
+#include <AsteriskSCF/logger.h>
 #include "ExpectedLogOut.h"
 
 using namespace AsteriskSCF::System::Logging;
diff --git a/client/test/LoggerFactory-test.cpp b/client/test/LoggerFactory-test.cpp
index 160b814..ea98bcc 100644
--- a/client/test/LoggerFactory-test.cpp
+++ b/client/test/LoggerFactory-test.cpp
@@ -16,7 +16,7 @@
 
 #include <boost/test/unit_test.hpp>
 
-#include "logger.h"
+#include <AsteriskSCF/logger.h>
 #include "ExpectedLogOut.h"
 
 using namespace AsteriskSCF::System::Logging;
diff --git a/client/test/scf-log.cpp b/client/test/scf-log.cpp
index a80beb4..c7bdf64 100644
--- a/client/test/scf-log.cpp
+++ b/client/test/scf-log.cpp
@@ -22,8 +22,8 @@
 #include <boost/program_options/variables_map.hpp>
 #include <boost/program_options/parsers.hpp>
 
-#include "IceLogger.h"
-#include "logger.h"
+#include <AsteriskSCF/Logger/IceLogger.h>
+#include <AsteriskSCF/logger.h>
 
 using namespace AsteriskSCF::System::Logging;
 namespace po = boost::program_options;
diff --git a/client/src/IceLogger.h b/include/AsteriskSCF/Logger/IceLogger.h
similarity index 100%
rename from client/src/IceLogger.h
rename to include/AsteriskSCF/Logger/IceLogger.h
diff --git a/common/Level.h b/include/AsteriskSCF/Logger/Level.h
similarity index 100%
rename from common/Level.h
rename to include/AsteriskSCF/Logger/Level.h
diff --git a/client/src/LogOut.h b/include/AsteriskSCF/Logger/LogOut.h
similarity index 95%
rename from client/src/LogOut.h
rename to include/AsteriskSCF/Logger/LogOut.h
index 1fa9911..482612f 100644
--- a/client/src/LogOut.h
+++ b/include/AsteriskSCF/Logger/LogOut.h
@@ -18,7 +18,7 @@
 
 #include <string>
 
-#include "System/Logger/LoggerIf.h"
+#include <AsteriskSCF/System/Logger/LoggerIf.h>
 
 namespace AsteriskSCF
 {
diff --git a/client/src/logger.h b/include/AsteriskSCF/logger.h
similarity index 98%
rename from client/src/logger.h
rename to include/AsteriskSCF/logger.h
index 03ed7d1..9cabc4c 100644
--- a/client/src/logger.h
+++ b/include/AsteriskSCF/logger.h
@@ -25,9 +25,9 @@
 #include <boost/thread/shared_mutex.hpp>
 #include <boost/weak_ptr.hpp>
 
-#include "System/Logger/LoggerIf.h"
-#include "Level.h"
-#include "LogOut.h"
+#include <AsteriskSCF/System/Logger/LoggerIf.h>
+#include <AsteriskSCF/Logger/Level.h>
+#include <AsteriskSCF/Logger/LogOut.h>
 
 namespace AsteriskSCF
 {
diff --git a/server/src/CMakeLists.txt b/server/src/CMakeLists.txt
index 63e6c1e..0826d82 100644
--- a/server/src/CMakeLists.txt
+++ b/server/src/CMakeLists.txt
@@ -8,7 +8,7 @@
 
 asterisk_scf_component_init(logging-service CXX)
 
-include_directories(../../common)
+include_directories(../../include)
 
 asterisk_scf_component_add_slice(logging-service LoggerIf)
 asterisk_scf_component_add_slice(logging-service ServiceLocatorIf)
diff --git a/server/src/ChainedLogOut.h b/server/src/ChainedLogOut.h
index 931895b..eb5cedc 100644
--- a/server/src/ChainedLogOut.h
+++ b/server/src/ChainedLogOut.h
@@ -20,7 +20,7 @@
 
 #include <boost/shared_ptr.hpp>
 
-#include "Level.h"
+#include <AsteriskSCF/Logger/Level.h>
 
 namespace AsteriskSCF
 {
diff --git a/server/src/LoggingServer.cpp b/server/src/LoggingServer.cpp
index 9ffd9eb..43428aa 100644
--- a/server/src/LoggingServer.cpp
+++ b/server/src/LoggingServer.cpp
@@ -16,8 +16,9 @@
 
 #include <iomanip>
 
+#include <AsteriskSCF/Logger/Level.h>
+
 #include "LoggingServer.h"
-#include "Level.h"
 
 using namespace AsteriskSCF::System::Logging;
 
diff --git a/server/src/LoggingServer.h b/server/src/LoggingServer.h
index 2e81a12..a557a05 100644
--- a/server/src/LoggingServer.h
+++ b/server/src/LoggingServer.h
@@ -22,7 +22,7 @@
 
 #include <Ice/Properties.h>
 
-#include "LoggerIf.h"
+#include <AsteriskSCF/System/Logger/LoggerIf.h>
 #include "ChainedLogOut.h"
 
 namespace AsteriskSCF
diff --git a/server/src/main.cpp b/server/src/main.cpp
index 73edd63..9c5ad35 100644
--- a/server/src/main.cpp
+++ b/server/src/main.cpp
@@ -19,7 +19,7 @@
 #include <IceBox/IceBox.h>
 #include <IceStorm/IceStorm.h>
 
-#include "Core/Discovery/ServiceLocatorIf.h"
+#include <AsteriskSCF/Core/Discovery/ServiceLocatorIf.h>
 
 #include "LoggingServer.h"
 #include "FileChainedLogOut.h"
diff --git a/server/test/CMakeLists.txt b/server/test/CMakeLists.txt
index 62a4b9d..a7e99e9 100644
--- a/server/test/CMakeLists.txt
+++ b/server/test/CMakeLists.txt
@@ -9,7 +9,7 @@
 asterisk_scf_component_init(logging-service-test CXX)
 
 include_directories(../src)
-include_directories(../../common)
+include_directories(../../include)
 
 asterisk_scf_component_add_slice(logging-service-test LoggerIf)
 

commit 554326af9808dd5830de626e5e2ee8931168a9b6
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Fri Jan 7 07:40:18 2011 -0600

    Don't provide names for exception objects in catch() clauses unless
    the code is actually going to refer to the object in some way... otherwise
    Visual Studio complains about an unreferenced local variable.

diff --git a/server/src/main.cpp b/server/src/main.cpp
index 73edd63..54732bd 100644
--- a/server/src/main.cpp
+++ b/server/src/main.cpp
@@ -121,13 +121,13 @@ void LoggingService::start(const std::string& name,
                 {
                     topic = topicManager->retrieve(ServerConfigurationTopic);
                 }
-                catch (const IceStorm::NoSuchTopic& e)
+                catch (const IceStorm::NoSuchTopic&)
                 {
                     try
                     {
                         topic = topicManager->create(ServerConfigurationTopic);
                     }
-                    catch (const IceStorm::TopicExists& e)
+                    catch (const IceStorm::TopicExists&)
                     {
                         // we had a race to create the object w/ someone else
                         // and lost

commit 3c7e5ae1e04eef989f73b3811e713d2ab667fc9e
Author: Ken Hunt <ken.hunt at digium.com>
Date:   Thu Jan 6 15:45:38 2011 -0600

    Added include of boost/thread/mutex.hpp required under boost 1.43 (at
    least on Windows).

diff --git a/client/src/logger.h b/client/src/logger.h
index f7f95fb..03ed7d1 100644
--- a/client/src/logger.h
+++ b/client/src/logger.h
@@ -21,6 +21,7 @@
 
 #include <boost/shared_ptr.hpp>
 #include <boost/thread/locks.hpp>
+#include <boost/thread/mutex.hpp>
 #include <boost/thread/shared_mutex.hpp>
 #include <boost/weak_ptr.hpp>
 

commit b3fcaefff15075d3d62a50868716def5d3d5641e
Author: David M. Lee <dlee at digium.com>
Date:   Tue Dec 14 18:38:33 2010 -0600

    impl -> mImpl
    
    Adjusted name to match the style guide that, for some reason, I'm
    having trouble adjusting to.  Is it me?  Is it too much like Hungarian
    notation for my subconcious to accept?  Must try harder.
    See CR-ASTSCF-24.

diff --git a/client/src/logger.h b/client/src/logger.h
index b57dcb2..f7f95fb 100644
--- a/client/src/logger.h
+++ b/client/src/logger.h
@@ -219,7 +219,7 @@ public:
     Level getEffectiveLevel() const;
 
 private:
-    boost::shared_ptr<LoggerImpl> impl;
+    boost::shared_ptr<LoggerImpl> mImpl;
 };
 
 class Logger::LoggerImpl
@@ -353,26 +353,26 @@ private:
 // since these are all simple delegates to LoggerImpl, inline them
 
 inline Logger::Logger(const boost::shared_ptr<LoggerImpl>& impl) :
-    impl(impl)
+    mImpl(impl)
 {
 }
 
 inline Logger::Logger(const std::string& name, LogOut& out, Level logLevel) :
-    impl(new LoggerImpl(name, out, logLevel))
+    mImpl(new LoggerImpl(name, out, logLevel))
 {
 }
 
 inline bool Logger::isEnabledFor(Level level) const
 {
-    return impl->isEnabledFor(level);
+    return mImpl->isEnabledFor(level);
 }
 inline CondStream Logger::operator()(Level level) const
 {
-    return (*impl)(level);
+    return (*mImpl)(level);
 }
 inline void Logger::logs(Level level, const std::string& message) const
 {
-    impl->logs(level, message);
+    mImpl->logs(level, message);
 }
 inline void Logger::logf(Level level, char const *fmt, ...) const
 {
@@ -380,7 +380,7 @@ inline void Logger::logf(Level level, char const *fmt, ...) const
     va_start(ap, fmt);
     try
     {
-        impl->vlogf(level, fmt, ap);
+        mImpl->vlogf(level, fmt, ap);
     }
     catch(...)
     {
@@ -391,39 +391,39 @@ inline void Logger::logf(Level level, char const *fmt, ...) const
 }
 inline void Logger::vlogf(Level level, char const *fmt, va_list ap) const
 {
-    impl->vlogf(level, fmt, ap);
+    mImpl->vlogf(level, fmt, ap);
 }
 inline Logger Logger::getChild(const std::string& childName)
 {
-    return impl->getChild(impl, childName);
+    return mImpl->getChild(mImpl, childName);
 }
 inline std::vector<Logger> Logger::getChildren() const
 {
-    return impl->getChildren();
+    return mImpl->getChildren();
 }
 inline const std::string& Logger::getName() const
 {
-    return impl->getName();
+    return mImpl->getName();
 }
 inline LogOut& Logger::getOutput() const
 {
-    return impl->getOutput();
+    return mImpl->getOutput();
 }
 inline void Logger::setOutput(LogOut& out)
 {
-    impl->setOutput(out);
+    mImpl->setOutput(out);
 }
 inline void Logger::setLevel(Level logLevel)
 {
-    impl->setLevel(logLevel);
+    mImpl->setLevel(logLevel);
 }
 inline void Logger::unsetLevel()
 {
-    impl->unsetLevel();
+    mImpl->unsetLevel();
 }
 inline Level Logger::getEffectiveLevel() const
 {
-    return impl->getEffectiveLevel();
+    return mImpl->getEffectiveLevel();
 }
 
 /**

commit 869c886b995992b695893795f4dcaf4b36bf43fc
Author: David M. Lee <dlee at digium.com>
Date:   Fri Dec 10 14:18:52 2010 -0600

    Changed Logger.mParent from raw ptr to weak_ptr.
    
    Raw pointers had the danger of dangling, since there's no longer any
    guarantee that parents will kill their children before dying (as
    gruesome as that sounds).  The use of weak_ptr's makes that safe, while
    avoiding memory leaks that would result from circular shared_ptr
    references.

diff --git a/client/src/Logger.cpp b/client/src/Logger.cpp
index ae74361..c1403e3 100644
--- a/client/src/Logger.cpp
+++ b/client/src/Logger.cpp
@@ -63,16 +63,18 @@ void LogBuf::sendBuffer()
 }
 
 Logger::LoggerImpl::LoggerImpl(const std::string& name, LogOut& out, Level logLevel) :
-    mParent(0), mName(name), mOut(&out), mLogLevel(logLevel), mInheritedLevel(false)
+    mParent(), mName(name), mOut(&out), mLogLevel(logLevel), mInheritedLevel(false)
 {
 }
 
-Logger::LoggerImpl::LoggerImpl(const LoggerImpl& parent, const std::string& name) :
-    mParent(&parent), mName(name), mOut(parent.mOut), mLogLevel(Off),
+Logger::LoggerImpl::LoggerImpl(const boost::shared_ptr<LoggerImpl>& parent, const std::string& name) :
+    mParent(parent), mName(name), mOut(parent->mOut), mLogLevel(Off),
     mInheritedLevel(true)
 {
+    // parent ptr must be non-null
+    assert(parent != 0);
     // our name must begin w/ parent's name
-    assert(name.find(parent.mName) == 0);
+    assert(name.find(parent->mName) == 0);
 }
 
 Logger::LoggerImpl::~LoggerImpl()
@@ -132,10 +134,13 @@ void Logger::LoggerImpl::unsetLevel()
 Level Logger::LoggerImpl::getEffectiveLevel() const
 {
     boost::shared_lock<boost::shared_mutex> lock(mLevelMutex);
+    // If parent is null, either we've never had a parent, or that
+    // parent has been destroyed.
+    boost::shared_ptr<const LoggerImpl> parent = mParent.lock();
     // if our level is unset, inherit level from our parent.
-    if (mInheritedLevel == true && mParent != 0)
+    if (mInheritedLevel == true && parent != 0)
     {
-        return mParent->getEffectiveLevel();
+        return parent->getEffectiveLevel();
     }
     else
     {
@@ -143,7 +148,8 @@ Level Logger::LoggerImpl::getEffectiveLevel() const
     }
 }
 
-Logger Logger::LoggerImpl::getChild(const std::string& childName)
+Logger Logger::LoggerImpl::getChild(const boost::shared_ptr<LoggerImpl>& self,
+    const std::string& childName)
 {
     boost::lock_guard<boost::mutex> childLock(mChildrenMutex);
 
@@ -153,7 +159,7 @@ Logger Logger::LoggerImpl::getChild(const std::string& childName)
     {
         std::string fullName = getName().empty() ? childName : getName() + "."
             + childName;
-        child.reset(new LoggerImpl(*this, fullName));
+        child.reset(new LoggerImpl(self, fullName));
     }
     return Logger(child);
 }
diff --git a/client/src/logger.h b/client/src/logger.h
index b1700b4..b57dcb2 100644
--- a/client/src/logger.h
+++ b/client/src/logger.h
@@ -22,6 +22,7 @@
 #include <boost/shared_ptr.hpp>
 #include <boost/thread/locks.hpp>
 #include <boost/thread/shared_mutex.hpp>
+#include <boost/weak_ptr.hpp>
 
 #include "System/Logger/LoggerIf.h"
 #include "Level.h"
@@ -161,11 +162,6 @@ public:
     Logger(const std::string& name, LogOut& out, Level logLevel = Debug);
 
     /**
-     * Construct a child Logger.
-     */
-    Logger(const LoggerImpl& parent, const std::string& name);
-
-    /**
      * If true, this Logger would log messages of the given Level.
      *
      * @param level Level to check.
@@ -232,12 +228,14 @@ public:
     /**
      * Construct a root Logger.
      */
-    ASTERISK_SCF_ICEBOX_EXPORT LoggerImpl(const std::string& name, LogOut& out, Level logLevel = Debug);
+    ASTERISK_SCF_ICEBOX_EXPORT LoggerImpl(const std::string& name, LogOut& out,
+        Level logLevel = Debug);
 
     /**
      * Construct a child Logger.
      */
-    ASTERISK_SCF_ICEBOX_EXPORT LoggerImpl(const LoggerImpl& parent, const std::string& name);
+    ASTERISK_SCF_ICEBOX_EXPORT LoggerImpl(
+        const boost::shared_ptr<LoggerImpl>& parent, const std::string& name);
 
     ASTERISK_SCF_ICEBOX_EXPORT ~LoggerImpl();
 
@@ -270,7 +268,8 @@ public:
      */
     ASTERISK_SCF_ICEBOX_EXPORT void vlogf(Level level, char const *fmt, va_list ap) const;
 
-    ASTERISK_SCF_ICEBOX_EXPORT Logger getChild(const std::string& childName);
+    ASTERISK_SCF_ICEBOX_EXPORT Logger getChild(
+        const boost::shared_ptr<LoggerImpl>& self, const std::string& childName);
     ASTERISK_SCF_ICEBOX_EXPORT std::vector<Logger> getChildren() const;
 
     const std::string& getName() const
@@ -314,8 +313,13 @@ private:
     /**
      * Parent pointer.  We cannot change which parent we have, nor can we change
      * our parent.
+     *
+     * This can't be a shared_ptr, because then the circular reference would
+     * cause memory leaks.
+     *
+     * It also can't be a raw pointer, since children can outlive their parents.
      */
-    LoggerImpl const * const mParent;
+    boost::weak_ptr<LoggerImpl const> const mParent;
     typedef std::map<std::string, boost::shared_ptr<LoggerImpl> > Children;
     /**
      * Map of children.  The key is the next final node in that child's name.
@@ -358,11 +362,6 @@ inline Logger::Logger(const std::string& name, LogOut& out, Level logLevel) :
 {
 }
 
-inline Logger::Logger(const LoggerImpl& parent, const std::string& name) :
-    impl(new LoggerImpl(parent, name))
-{
-}
-
 inline bool Logger::isEnabledFor(Level level) const
 {
     return impl->isEnabledFor(level);
@@ -396,7 +395,7 @@ inline void Logger::vlogf(Level level, char const *fmt, va_list ap) const
 }
 inline Logger Logger::getChild(const std::string& childName)
 {
-    return impl->getChild(childName);
+    return impl->getChild(impl, childName);
 }
 inline std::vector<Logger> Logger::getChildren() const
 {

commit 71f2a6e6aec4ba5c50a678a142e44adbff3ccfcb
Author: David M. Lee <dlee at digium.com>
Date:   Fri Dec 10 13:49:00 2010 -0600

    Added reference counting to Logger.
    
    Improved confidence in using the Logger by making Logger instances
    reference counted.  This is almost source compatible, with the only
    change to users is that getLogger() now returns a Logger instance rather
    than a Logger&.

diff --git a/client/src/Logger.cpp b/client/src/Logger.cpp
index 54b6c74..ae74361 100644
--- a/client/src/Logger.cpp
+++ b/client/src/Logger.cpp
@@ -62,29 +62,29 @@ void LogBuf::sendBuffer()
     mOut.logs(nName, mLogLevel, message);
 }
 
-Logger::Logger(const std::string& name, LogOut& out, Level logLevel) :
+Logger::LoggerImpl::LoggerImpl(const std::string& name, LogOut& out, Level logLevel) :
     mParent(0), mName(name), mOut(&out), mLogLevel(logLevel), mInheritedLevel(false)
 {
 }
 
-Logger::Logger(const Logger& parent, const std::string& name) :
-    mParent(&parent), mName(name), mOut(parent.mOut), mLogLevel(Off), mInheritedLevel(
-        true)
+Logger::LoggerImpl::LoggerImpl(const LoggerImpl& parent, const std::string& name) :
+    mParent(&parent), mName(name), mOut(parent.mOut), mLogLevel(Off),
+    mInheritedLevel(true)
 {
     // our name must begin w/ parent's name
     assert(name.find(parent.mName) == 0);
 }
 
-Logger::~Logger()
+Logger::LoggerImpl::~LoggerImpl()
 {
 }
 
-CondStream Logger::operator()(Level level) const
+CondStream Logger::LoggerImpl::operator()(Level level) const
 {
     return CondStream(*mOut, mName, level, isEnabledFor(level));
 }
 
-void Logger::logs(Level level, const std::string& message) const
+void Logger::LoggerImpl::logs(Level level, const std::string& message) const
 {
     if (isEnabledFor(level))
     {
@@ -92,23 +92,7 @@ void Logger::logs(Level level, const std::string& message) const
     }
 }
 
-void Logger::logf(Level level, char const *fmt, ...) const
-{
-    va_list ap;
-    va_start(ap, fmt);
-    try
-    {
-        vlogf(level, fmt, ap);
-    }
-    catch(...)
-    {
-        va_end(ap);
-        throw;
-    }
-    va_end(ap);
-}
-
-void Logger::vlogf(Level level, char const *fmt, va_list ap) const
+void Logger::LoggerImpl::vlogf(Level level, char const *fmt, va_list ap) const
 {
     if (isEnabledFor(level))
     {
@@ -118,7 +102,7 @@ void Logger::vlogf(Level level, char const *fmt, va_list ap) const
     }
 }
 
-void Logger::setOutput(LogOut& out)
+void Logger::LoggerImpl::setOutput(LogOut& out)
 {
     this->mOut = &out;
     boost::lock_guard<boost::mutex> childLock(mChildrenMutex);
@@ -131,21 +115,21 @@ void Logger::setOutput(LogOut& out)
 }
 
 
-void Logger::setLevel(Level logLevel)
+void Logger::LoggerImpl::setLevel(Level logLevel)
 {
     boost::unique_lock<boost::shared_mutex> lock(mLevelMutex);
     mLogLevel = logLevel;
     mInheritedLevel = false;
 }
 
-void Logger::unsetLevel()
+void Logger::LoggerImpl::unsetLevel()
 {
     boost::unique_lock<boost::shared_mutex> lock(mLevelMutex);
     mInheritedLevel = true;
     mLogLevel = Off;
 }
 
-Level Logger::getEffectiveLevel() const
+Level Logger::LoggerImpl::getEffectiveLevel() const
 {
     boost::shared_lock<boost::shared_mutex> lock(mLevelMutex);
     // if our level is unset, inherit level from our parent.
@@ -159,24 +143,24 @@ Level Logger::getEffectiveLevel() const
     }
 }
 
-Logger& Logger::getChild(const std::string& childName)
+Logger Logger::LoggerImpl::getChild(const std::string& childName)
 {
     boost::lock_guard<boost::mutex> childLock(mChildrenMutex);
 
     // ref to ptr allows us to update the map in-place
-    boost::shared_ptr<Logger>& child = mChildren[childName];
+    boost::shared_ptr<LoggerImpl>& child = mChildren[childName];
     if (child == 0)
     {
         std::string fullName = getName().empty() ? childName : getName() + "."
             + childName;
-        child.reset(new Logger(*this, fullName));
+        child.reset(new LoggerImpl(*this, fullName));
     }
-    return *child;
+    return Logger(child);
 }
 
-std::vector<boost::shared_ptr<const Logger> > Logger::getChildren() const
+std::vector<Logger> Logger::LoggerImpl::getChildren() const
 {
-    std::vector<boost::shared_ptr<const Logger> > r;
+    std::vector<Logger> r;
     boost::lock_guard<boost::mutex> childLock(mChildrenMutex);
     for (Children::const_iterator i = mChildren.begin();
          i != mChildren.end();
diff --git a/client/src/LoggerFactory.cpp b/client/src/LoggerFactory.cpp
index 81e349b..0b1e845 100644
--- a/client/src/LoggerFactory.cpp
+++ b/client/src/LoggerFactory.cpp
@@ -55,7 +55,7 @@ LoggerFactory::LoggerFactory(LogOut& out) :
 {
 }
 
-Logger& LoggerFactory::getLogger(const std::string& name)
+Logger LoggerFactory::getLogger(const std::string& name)
 {
     std::vector<std::string> path;
     // older versions of boost output a single entry when splitting an empty
@@ -65,13 +65,13 @@ Logger& LoggerFactory::getLogger(const std::string& name)
         split(path, name, std::bind1st(std::equal_to<char>(), '.'));
     }
 
-    Logger *logger = &mRoot;
+    Logger logger = mRoot;
     for (std::vector<std::string>::iterator i = path.begin(); i != path.end(); ++i)
     {
-        logger = &logger->getChild(*i);
+        logger = logger.getChild(*i);
     }
 
-    return *logger;
+    return logger;
 }
 
 std::vector<std::string> LoggerFactory::getLoggerNames() const
@@ -81,16 +81,16 @@ std::vector<std::string> LoggerFactory::getLoggerNames() const
     return r;
 }
 
-void LoggerFactory::accumulateLoggerNames(const Logger& logger,
+void LoggerFactory::accumulateLoggerNames(Logger logger,
     std::vector<std::string>& out)
 {
     out.push_back(logger.getName());
     // recurse through the children
-    const std::vector<boost::shared_ptr<const Logger> >& children = logger.getChildren();
-    for (std::vector<boost::shared_ptr<const Logger> >::const_iterator i = children.begin(); i
+    const std::vector<Logger>& children = logger.getChildren();
+    for (std::vector<Logger>::const_iterator i = children.begin(); i
              != children.end(); ++i)
     {
-        accumulateLoggerNames(**i, out);
+        accumulateLoggerNames(*i, out);
     }
 }
 
diff --git a/client/src/logger.h b/client/src/logger.h
index 1e94b62..b1700b4 100644
--- a/client/src/logger.h
+++ b/client/src/logger.h
@@ -138,22 +138,108 @@ inline CondStream& CondStream::operator<<(std::ostream& (*pf)(std::ostream&))
 }
 
 /**
- * The Logger for a particular source, identified by the given name.
+ * The Logger for a particular source, identified by the given name.  This is a
+ * small wrapper class, which should be passed around by copy.
  */
 class Logger
 {
+    // You may wonder why have this class at all.  It only delegates to
+    // LoggerImpl, so why not typedef shared_ptr<LoggerImpl> LoggerPtr
+    // and use that?  The problem with that approach is that we would lose
+    // the stream style debugging, or at least may it a bit more cumbersome.
+    //   (*lg)(Debug)      << "you'd have to dereference the smart pointer"
+    //   lg->stream(Debug) << "or have a named function"
+private:
+    /** Implementation class */
+    class LoggerImpl;
+public:
+    /** Construct a Logger for an existing implementation */
+    Logger(const boost::shared_ptr<LoggerImpl>& impl);
+    /**
+     * Construct a root Logger.
+     */
+    Logger(const std::string& name, LogOut& out, Level logLevel = Debug);
+
+    /**
+     * Construct a child Logger.
+     */
+    Logger(const LoggerImpl& parent, const std::string& name);
+
+    /**
+     * If true, this Logger would log messages of the given Level.
+     *
+     * @param level Level to check.
+     * @return true if enabled for given level.
+     */
+    bool isEnabledFor(Level level) const;
+
+    /**
+     * Ostream style logging.
+     *
+     * @param level Level for messages sent to this stream.
+     * @return LogStream that logs at the given level.
+     */
+    CondStream operator()(Level level) const;
+
+    /**
+     * Log a single message.
+     */
+    void logs(Level level, const std::string& message) const;
+
+    /**
+     * Log a single printf-formatted message.
+     */
+    void logf(Level level, char const *fmt, ...) const;
+
+    /**
+     * Log a single vprintf-formatted message.
+     */
+    void vlogf(Level level, char const *fmt, va_list ap) const;
+
+    Logger getChild(const std::string& childName);
+
+    std::vector<Logger> getChildren() const;
+
+    const std::string& getName() const;
+
+    LogOut& getOutput() const;
+
+    void setOutput(LogOut& out);
+
+    /**
+     * Set's the current logLevel.  Until unsetLevel() is called, we are no
+     * longer affected by changes to our parent's log level.
+     */
+    void setLevel(Level logLevel);
+
+    /**
+     * Changes our logLevel to now inherit from out parent.
+     */
+    void unsetLevel();
+
+    /**
+     * Returns the effective level of this Logger.
+     */
+    Level getEffectiveLevel() const;
+
+private:
+    boost::shared_ptr<LoggerImpl> impl;
+};
+
+class Logger::LoggerImpl
+{
 public:
     /**
      * Construct a root Logger.
      */
-    ASTERISK_SCF_ICEBOX_EXPORT Logger(const std::string& name, LogOut& out, Level logLevel = Debug);
+    ASTERISK_SCF_ICEBOX_EXPORT LoggerImpl(const std::string& name, LogOut& out, Level logLevel = Debug);
 
     /**
      * Construct a child Logger.
      */
-    ASTERISK_SCF_ICEBOX_EXPORT Logger(const Logger& parent, const std::string& name);
+    ASTERISK_SCF_ICEBOX_EXPORT LoggerImpl(const LoggerImpl& parent, const std::string& name);
 
-    ASTERISK_SCF_ICEBOX_EXPORT ~Logger();
+    ASTERISK_SCF_ICEBOX_EXPORT ~LoggerImpl();
 
     /**
      * If true, this Logger would log messages of the given Level.
@@ -180,29 +266,19 @@ public:
     ASTERISK_SCF_ICEBOX_EXPORT void logs(Level level, const std::string& message) const;
 
     /**
-     * Log a single printf-formatted message.
-     */
-    ASTERISK_SCF_ICEBOX_EXPORT void logf(Level level, char const *fmt, ...) const;
-
-    /**
      * Log a single vprintf-formatted message.
      */
     ASTERISK_SCF_ICEBOX_EXPORT void vlogf(Level level, char const *fmt, va_list ap) const;
 
-    Logger const *getParent() const
-    {
-        return mParent;
-    }
+    ASTERISK_SCF_ICEBOX_EXPORT Logger getChild(const std::string& childName);
+    ASTERISK_SCF_ICEBOX_EXPORT std::vector<Logger> getChildren() const;
 
-    ASTERISK_SCF_ICEBOX_EXPORT Logger& getChild(const std::string& childName);
-    ASTERISK_SCF_ICEBOX_EXPORT std::vector<boost::shared_ptr<const Logger> > getChildren() const;
-
-    ASTERISK_SCF_ICEBOX_EXPORT const std::string& getName() const
+    const std::string& getName() const
     {
         return mName;
     }
 
-    ASTERISK_SCF_ICEBOX_EXPORT LogOut& getOutput() const
+    LogOut& getOutput() const
     {
         return *mOut;
     }
@@ -227,8 +303,8 @@ public:
 
 private:
     // non-copyable
-    Logger(const Logger&);
-    const Logger& operator=(const Logger&);
+    LoggerImpl(const Logger&);
+    const LoggerImpl& operator=(const LoggerImpl&);
 
     /**
      * Mutex for access to the children field.
@@ -239,8 +315,8 @@ private:
      * Parent pointer.  We cannot change which parent we have, nor can we change
      * our parent.
      */
-    Logger const * const mParent;
-    typedef std::map<std::string, boost::shared_ptr<Logger> > Children;
+    LoggerImpl const * const mParent;
+    typedef std::map<std::string, boost::shared_ptr<LoggerImpl> > Children;
     /**
      * Map of children.  The key is the next final node in that child's name.
      */
@@ -270,6 +346,87 @@ private:
     bool mInheritedLevel;
 };
 
+// since these are all simple delegates to LoggerImpl, inline them
+
+inline Logger::Logger(const boost::shared_ptr<LoggerImpl>& impl) :
+    impl(impl)
+{
+}
+
+inline Logger::Logger(const std::string& name, LogOut& out, Level logLevel) :
+    impl(new LoggerImpl(name, out, logLevel))
+{
+}
+
+inline Logger::Logger(const LoggerImpl& parent, const std::string& name) :
+    impl(new LoggerImpl(parent, name))
+{
+}
+
+inline bool Logger::isEnabledFor(Level level) const
+{
+    return impl->isEnabledFor(level);
+}
+inline CondStream Logger::operator()(Level level) const
+{
+    return (*impl)(level);
+}
+inline void Logger::logs(Level level, const std::string& message) const
+{
+    impl->logs(level, message);
+}
+inline void Logger::logf(Level level, char const *fmt, ...) const
+{
+    va_list ap;
+    va_start(ap, fmt);
+    try
+    {
+        impl->vlogf(level, fmt, ap);
+    }
+    catch(...)
+    {
+        va_end(ap);
+        throw;
+    }
+    va_end(ap);
+}
+inline void Logger::vlogf(Level level, char const *fmt, va_list ap) const
+{
+    impl->vlogf(level, fmt, ap);
+}
+inline Logger Logger::getChild(const std::string& childName)
+{
+    return impl->getChild(childName);
+}
+inline std::vector<Logger> Logger::getChildren() const
+{
+    return impl->getChildren();
+}
+inline const std::string& Logger::getName() const
+{
+    return impl->getName();
+}
+inline LogOut& Logger::getOutput() const
+{
+    return impl->getOutput();
+}
+inline void Logger::setOutput(LogOut& out)
+{
+    impl->setOutput(out);
+}
+inline void Logger::setLevel(Level logLevel)
+{
+    impl->setLevel(logLevel);
+}
+inline void Logger::unsetLevel()
+{
+    impl->unsetLevel();
+}
+inline Level Logger::getEffectiveLevel() const
+{
+    return impl->getEffectiveLevel();
+}
+
 /**
  * Main entry point into the Logger system.
  */
@@ -286,7 +443,7 @@ public:
      * @return Ref to the Logger.
      * @thread-safe
      */
-    ASTERISK_SCF_ICEBOX_EXPORT Logger& getLogger(const std::string& name);
+    ASTERISK_SCF_ICEBOX_EXPORT Logger getLogger(const std::string& name);
 
     /**
      * Returns a vector of the names of all currently configured Logger's.
@@ -299,7 +456,7 @@ public:
 private:
     Logger mRoot;
 
-    static void accumulateLoggerNames(const Logger& logger, std::vector<std::string>& out);
+    static void accumulateLoggerNames(Logger logger, std::vector<std::string>& out);
 };
 
 ASTERISK_SCF_ICEBOX_EXPORT boost::shared_ptr<LogOut> buildOstreamLogger(std::ostream& out);
diff --git a/client/test/LoggerFactory-test.cpp b/client/test/LoggerFactory-test.cpp
index 8d6c3cb..160b814 100644
--- a/client/test/LoggerFactory-test.cpp
+++ b/client/test/LoggerFactory-test.cpp
@@ -23,28 +23,16 @@ using namespace AsteriskSCF::System::Logging;
 
 BOOST_AUTO_TEST_SUITE(LoggerFactoryTest)
 
-BOOST_AUTO_TEST_CASE(testGetDistinct)
-{
-    std::stringstream tmp;
-    boost::shared_ptr<LogOut> logOut = buildOstreamLogger(tmp);
-    LoggerFactory uut(*logOut);
-
-    const Logger& asteriskScf = uut.getLogger("AsteriskSCF");
-    const Logger& core = uut.getLogger("AsteriskSCF.Core");
-
-    BOOST_CHECK_NE(&core, &asteriskScf);
-    BOOST_CHECK_EQUAL(&asteriskScf, core.getParent());
-    BOOST_CHECK_EQUAL(&uut.getLogger(""), asteriskScf.getParent());
-}
-
 BOOST_AUTO_TEST_CASE(testInheritence_off)
 {
     std::stringstream actual;
     boost::shared_ptr<LogOut> logOut = buildOstreamLogger(actual);
     LoggerFactory uut(*logOut);
 
-    Logger& root = uut.getLogger("");
-    Logger& asteriskScf = uut.getLogger("AsteriskSCF");
+    Logger root = uut.getLogger("");
+    Logger asteriskScf = uut.getLogger("AsteriskSCF");
+
+    root = asteriskScf;
 
     root.setLevel(Off);
 
@@ -58,8 +46,8 @@ BOOST_AUTO_TEST_CASE(testInheritence_on)
     boost::shared_ptr<LogOut> logOut = buildOstreamLogger(actual);
     LoggerFactory uut(*logOut);
 
-    Logger& root = uut.getLogger("");
-    Logger& asteriskScf = uut.getLogger("AsteriskSCF");
+    Logger root = uut.getLogger("");
+    Logger asteriskScf = uut.getLogger("AsteriskSCF");
 
     root.setLevel(Debug);
 
@@ -81,8 +69,6 @@ BOOST_AUTO_TEST_CASE(testChangeLogOut)
     uut.logs(Debug, "Debug Message");
     out1.check();
     out2.check();
-
-
 }
 
 BOOST_AUTO_TEST_SUITE_END()

commit d2dd67b7a2e5e77eb83a2c7bee65c7f8d6a2b6bf
Author: David M. Lee <dlee at digium.com>
Date:   Mon Jan 3 09:58:04 2011 -0600

    Fixed thread safety issues in Logger client.
    
    * Added a shared_mutex around mLogLevel and mInheritedLevel.  This
      should make it thread safe, and keep read contention very low.
    * Since Ice didn't offer a shared_mutex, switched the existing
      mChildrenMutex from an Ice mutex to a Boost mutex, for consistency.
    See CR-ASTSCF-4.

diff --git a/client/src/Logger.cpp b/client/src/Logger.cpp
index 15b4d50..54b6c74 100644
--- a/client/src/Logger.cpp
+++ b/client/src/Logger.cpp
@@ -77,7 +77,6 @@ Logger::Logger(const Logger& parent, const std::string& name) :
 
 Logger::~Logger()
 {
-    IceUtil::Mutex::Lock childLock(mChildrenMutex);
 }
 
 CondStream Logger::operator()(Level level) const
@@ -122,7 +121,7 @@ void Logger::vlogf(Level level, char const *fmt, va_list ap) const
 void Logger::setOutput(LogOut& out)
 {
     this->mOut = &out;
-    IceUtil::Mutex::Lock childLock(mChildrenMutex);
+    boost::lock_guard<boost::mutex> childLock(mChildrenMutex);
     for (Children::const_iterator i = mChildren.begin();
          i != mChildren.end();
          ++i)
@@ -134,18 +133,21 @@ void Logger::setOutput(LogOut& out)
 
 void Logger::setLevel(Level logLevel)
 {
-    this->mLogLevel = logLevel;
+    boost::unique_lock<boost::shared_mutex> lock(mLevelMutex);
+    mLogLevel = logLevel;
     mInheritedLevel = false;
 }
 
 void Logger::unsetLevel()
 {
+    boost::unique_lock<boost::shared_mutex> lock(mLevelMutex);
     mInheritedLevel = true;
     mLogLevel = Off;
 }
 
 Level Logger::getEffectiveLevel() const
 {
+    boost::shared_lock<boost::shared_mutex> lock(mLevelMutex);
     // if our level is unset, inherit level from our parent.
     if (mInheritedLevel == true && mParent != 0)
     {
@@ -159,7 +161,7 @@ Level Logger::getEffectiveLevel() const
 
 Logger& Logger::getChild(const std::string& childName)
 {
-    IceUtil::Mutex::Lock childLock(mChildrenMutex);
+    boost::lock_guard<boost::mutex> childLock(mChildrenMutex);
 
     // ref to ptr allows us to update the map in-place
     boost::shared_ptr<Logger>& child = mChildren[childName];
@@ -175,7 +177,7 @@ Logger& Logger::getChild(const std::string& childName)
 std::vector<boost::shared_ptr<const Logger> > Logger::getChildren() const
 {
     std::vector<boost::shared_ptr<const Logger> > r;
-    IceUtil::Mutex::Lock childLock(mChildrenMutex);
+    boost::lock_guard<boost::mutex> childLock(mChildrenMutex);
     for (Children::const_iterator i = mChildren.begin();
          i != mChildren.end();
          ++i)
diff --git a/client/src/logger.h b/client/src/logger.h
index 88e375a..1e94b62 100644
--- a/client/src/logger.h
+++ b/client/src/logger.h
@@ -20,6 +20,8 @@
 #include <cstdarg>
 
 #include <boost/shared_ptr.hpp>
+#include <boost/thread/locks.hpp>
+#include <boost/thread/shared_mutex.hpp>
 
 #include "System/Logger/LoggerIf.h"
 #include "Level.h"
@@ -231,7 +233,7 @@ private:
     /**
      * Mutex for access to the children field.
      */
-    IceUtil::Mutex mChildrenMutex;
+    mutable boost::mutex mChildrenMutex;
 
     /**
      * Parent pointer.  We cannot change which parent we have, nor can we change
@@ -252,6 +254,12 @@ private:
      * Output for log messages.
      */
     LogOut *mOut;
+
+    /**
+     * Mutex for accessing mLogLevel and mInheritedLevel.  It's a shared_mutext
+     * to reduce read contention on the mutex.
+     */
+    mutable boost::shared_mutex mLevelMutex;
     /**
      * Current level of this Logger.  Only applicable if inheritedLevel == false.
      */

commit 296b0194c1b37f5b54db610716d20553cef9564f
Author: David M. Lee <dlee at digium.com>
Date:   Mon Jan 3 09:16:48 2011 -0600

    Improved IceConfigurator-test by not sorting inputs.
    
    See CR-ASTSCF-4.

diff --git a/client/test/IceConfigurator-test.cpp b/client/test/IceConfigurator-test.cpp
index 90d49e5..0ec8fef 100644
--- a/client/test/IceConfigurator-test.cpp
+++ b/client/test/IceConfigurator-test.cpp
@@ -43,10 +43,11 @@ BOOST_AUTO_TEST_CASE(test_simple)
     IceConfigurator uut(factory);
 
     Configuration cfg;
-    addConfig(cfg, "", Error);
+    // check logic for unordered inputs
     addConfig(cfg, "AsteriskSCF", Info);
-    addConfig(cfg, "AsteriskSCF.Core", Debug);
     addConfig(cfg, "AsteriskSCF.Media", Off);
+    addConfig(cfg, "AsteriskSCF.Core", Debug);
+    addConfig(cfg, "", Error);
 
     uut.configured(cfg);
 

commit 89b93578b469ad254ea3d6f9bc98d2e0b0e3fa90
Author: David M. Lee <dlee at digium.com>
Date:   Mon Jan 3 09:12:58 2011 -0600

    Made Logger::logf exception safe.
    
    See CR-ASTSCF-4.

diff --git a/client/src/Logger.cpp b/client/src/Logger.cpp
index 8c9059c..15b4d50 100644
--- a/client/src/Logger.cpp
+++ b/client/src/Logger.cpp
@@ -97,7 +97,15 @@ void Logger::logf(Level level, char const *fmt, ...) const
 {
     va_list ap;
     va_start(ap, fmt);
-    vlogf(level, fmt, ap);
+    try
+    {
+        vlogf(level, fmt, ap);
+    }
+    catch(...)
+    {
+        va_end(ap);
+        throw;
+    }
     va_end(ap);
 }
 

commit 40db741c9c3c91f88e35860f4f3ddc5fd0f06c7f
Author: David M. Lee <dlee at digium.com>
Date:   Sat Jan 1 04:18:06 2011 -0600

    Got rid of useless null termination of snprintf output.
    
    Must of crossed my strncpy with snprintf.
    See CR-ASTSCF-4.

diff --git a/client/src/Logger.cpp b/client/src/Logger.cpp
index d410834..8c9059c 100644
--- a/client/src/Logger.cpp
+++ b/client/src/Logger.cpp
@@ -107,8 +107,6 @@ void Logger::vlogf(Level level, char const *fmt, va_list ap) const
     {
         char message[MESSAGE_SIZE];
         vsnprintf(message, sizeof(message), fmt, ap);
-        // snprintf may not actually null terminate, so just in case
-        message[MESSAGE_SIZE - 1] = '\0';
         mOut->logs(mName, level, message);
     }
 }

commit 33154ba785ef6b6278b5840119d5b89415bdf6ae
Author: David M. Lee <dlee at digium.com>
Date:   Thu Dec 30 16:30:12 2010 -0600

    Fixed AMI blunder.
    
    I had written the locateFinished function, but never passed it to the
    begin_locate function.  :-(
    
    See CR-ASTSCF-4.

diff --git a/client/src/IceLogger.cpp b/client/src/IceLogger.cpp
index a608254..2a67f4b 100644
--- a/client/src/IceLogger.cpp
+++ b/client/src/IceLogger.cpp
@@ -78,7 +78,11 @@ void ConfiguredIceLogger::updateLoggerFromServiceLocator()
         // synchronous call to locate would result in a deadlock
         ServiceLocatorParamsPtr loggingServerParams =
             new ServiceLocatorParams(LoggingServerCategory);
-        mLocator->begin_locate(loggingServerParams);
+
+        Ice::CallbackPtr callback = Ice::newCallback(
+            this, &ConfiguredIceLogger::locateFinished);
+
+        mLocator->begin_locate(loggingServerParams, callback);
     }
 }
 
@@ -87,10 +91,14 @@ void ConfiguredIceLogger::locateFinished(const Ice::AsyncResultPtr& r)
     ServiceLocatorPrx locator = ServiceLocatorPrx::uncheckedCast(r->getProxy());
     try
     {
+        std::cout << "locate finished\n";
         Ice::ObjectPrx serverObject = locator->end_locate(r);
         if (serverObject)
         {
-            LoggingServerPrx server = LoggingServerPrx::checkedCast(
+            // XXX: the synchronous checkedCast call is causing a deadlock
+            // it's pretty safe to use an uncheckedCast, but not safe enough
+            // for me.
+            LoggingServerPrx server = LoggingServerPrx::uncheckedCast(
                 serverObject);
             mLogger.setServer(server);
         }

commit 87f836dfb3fa0b01f675a54ce57ed3d4720d2d69
Author: David M. Lee <dlee at digium.com>
Date:   Thu Dec 30 15:25:59 2010 -0600

    hasPrintedNoServerNotice -> mHasPrintedNoServerNotice
    
    See CR-ASTSCF-4.

diff --git a/client/src/IceLogger.cpp b/client/src/IceLogger.cpp
index 92cb0a4..a608254 100644
--- a/client/src/IceLogger.cpp
+++ b/client/src/IceLogger.cpp
@@ -48,8 +48,8 @@ void IceLogger::logs(const std::string& name, Level logLevel,
 
     if (!logged)
     {
-        if (!hasPrintedNoServerNotice) {
-            hasPrintedNoServerNotice = true;
+        if (!mHasPrintedNoServerNotice) {
+            mHasPrintedNoServerNotice = true;
             std::clog <<
                 "!!! Unable to log to server.  Please check configuration and server status.\n"
                 "!!! Logging to stderr instead.\n";
diff --git a/client/src/IceLogger.h b/client/src/IceLogger.h
index 87bc42e..a3ee3f7 100644
--- a/client/src/IceLogger.h
+++ b/client/src/IceLogger.h
@@ -27,7 +27,7 @@ namespace Logging
 class IceLogger : public LogOut
 {
 public:
-    IceLogger() : hasPrintedNoServerNotice(false) {}
+    IceLogger() : mHasPrintedNoServerNotice(false) {}
 
     void logs(const std::string& name, Level logLevel,
         const std::string& message);
@@ -37,7 +37,7 @@ public:
 
 private:
     LoggingServerPrx mServer;
-    bool hasPrintedNoServerNotice;
+    bool mHasPrintedNoServerNotice;
 };
 
 /**

commit 8e465e884056bad4c1ac19fead38a8ce6b25ad5d
Author: David M. Lee <dlee at digium.com>
Date:   Thu Dec 30 15:19:32 2010 -0600

    Fixed crossed reference in IceConfigurator.
    
    See CR-ASTSCF-4.

diff --git a/client/src/IceConfigurator.cpp b/client/src/IceConfigurator.cpp
index 508ff04..85c30cf 100644
--- a/client/src/IceConfigurator.cpp
+++ b/client/src/IceConfigurator.cpp
@@ -50,16 +50,14 @@ void IceConfigurator::configured(const Configuration& logConfiguration)
     std::sort(oldConfig.begin(), oldConfig.end());
     std::sort(newConfig.begin(), newConfig.end());
 
-    SourceConfigurationSeq::const_iterator newConfigIter =
-        logConfiguration.sourceSettings.begin();
+    SourceConfigurationSeq::const_iterator newConfigIter = newConfig.begin();
     std::vector<std::string>::const_iterator oldConfigIter = oldConfig.begin();
 
-    while (newConfigIter != logConfiguration.sourceSettings.end()
-        || oldConfigIter != oldConfig.end())
+    while (newConfigIter != newConfig.end() || oldConfigIter != oldConfig.end())
     {
         int cmp;
 
-        if (newConfigIter == logConfiguration.sourceSettings.end())
+        if (newConfigIter == newConfig.end())
         {
             // we ran out of new config; unset the rest of the old config
             // new[end] < old

commit 9f04ff8250a49f6185a58c30f681427f26b617ff
Author: Ken Hunt <ken.hunt at digium.com>
Date:   Tue Dec 7 17:17:36 2010 -0600

    Added ref to boost date_time. On Windows boost::thread has a dependency
    on boost::date_time.
... 19805 lines suppressed ...


-- 
team/dsessions/logger.git



More information about the asterisk-scf-commits mailing list