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

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Thu Sep 30 14:06:59 CDT 2010


branch "master" has been updated
       via  32343f16ab3c739233a4017bb8e726cedfa96525 (commit)
       via  76086b7ebf8e42624b8bd9d74d884fd7dbec65b7 (commit)
      from  640a139ba9fcb9edc57c1a4a983040e3071d7683 (commit)

Summary of changes:
 client/src/IceConfigurator.h |    6 ++--
 client/src/IceLogger.h       |    2 +-
 client/src/LogOut.h          |    4 +-
 client/src/logger.h          |   48 +++++++++++++++++++++---------------------
 client/test/CMakeLists.txt   |    7 +++++-
 server/test/CMakeLists.txt   |    2 +
 6 files changed, 38 insertions(+), 31 deletions(-)


- Log -----------------------------------------------------------------
commit 32343f16ab3c739233a4017bb8e726cedfa96525
Author: David M. Lee <dlee at digium.com>
Date:   Thu Sep 30 14:02:04 2010 -0500

    Fixed library linking problems on Windows.

diff --git a/client/test/CMakeLists.txt b/client/test/CMakeLists.txt
index 991380f..0edc06b 100644
--- a/client/test/CMakeLists.txt
+++ b/client/test/CMakeLists.txt
@@ -31,7 +31,12 @@ hydra_component_init(scf-log CXX)
 
 hydra_component_add_file(scf-log scf-log.cpp)
 hydra_component_add_slice(scf-log LoggerIf)
-hydra_component_add_boost_libraries(scf-log program_options)
+
+# For reasons unknown, adding this library causes duplicate symbol errors
+# on Windows.  But without it, Mac and Linux fail to compile
+if(NOT WIN32)
+   hydra_component_add_boost_libraries(scf-log program_options)
+endif()
 
 hydra_component_build_standalone(scf-log)
 target_link_libraries(scf-log logging-client)
diff --git a/server/test/CMakeLists.txt b/server/test/CMakeLists.txt
index cbaa25b..d221669 100644
--- a/server/test/CMakeLists.txt
+++ b/server/test/CMakeLists.txt
@@ -26,6 +26,8 @@ hydra_component_add_file(logging-service-test ../src/LoggingServer.h)
 hydra_component_add_file(logging-service-test LoggingServer-test.cpp)
 hydra_component_add_file(logging-service-test server-test.cpp)
 
+hydra_component_add_boost_libraries(logging-service-test unit_test_framework)
+
 hydra_component_build_standalone(logging-service-test)
 
 boost_add_test(logging-service-test)

commit 76086b7ebf8e42624b8bd9d74d884fd7dbec65b7
Author: David M. Lee <dlee at digium.com>
Date:   Thu Sep 30 13:35:24 2010 -0500

    Export symbols for Windows DLL.

diff --git a/client/src/IceConfigurator.h b/client/src/IceConfigurator.h
index 9b584a0..48bb9e5 100644
--- a/client/src/IceConfigurator.h
+++ b/client/src/IceConfigurator.h
@@ -29,15 +29,15 @@ public:
    {
    }
 
-   void configured(Configuration const &logConfiguration, Ice::Current const &);
-   void configured(Configuration const &logConfiguration);
+   HYDRA_ICEBOX_EXPORT void configured(Configuration const &logConfiguration, Ice::Current const &);
+   HYDRA_ICEBOX_EXPORT void configured(Configuration const &logConfiguration);
 private:
    LoggerFactory &factory;
 };
 
 typedef IceUtil::Handle<IceConfigurator> IceConfiguratorPtr;
 
-IceConfiguratorPtr createIceConfigurator(Ice::ObjectAdapterPtr adapter,
+HYDRA_ICEBOX_EXPORT IceConfiguratorPtr createIceConfigurator(Ice::ObjectAdapterPtr adapter,
    LoggerFactory &factory);
 
 } // Logging
diff --git a/client/src/IceLogger.h b/client/src/IceLogger.h
index 6785761..8dc002b 100644
--- a/client/src/IceLogger.h
+++ b/client/src/IceLogger.h
@@ -75,7 +75,7 @@ private:
 
 typedef IceUtil::Handle<ConfiguredIceLogger> ConfiguredIceLoggerPtr;
 
-ConfiguredIceLoggerPtr createIceLogger(Ice::ObjectAdapterPtr adapter);
+HYDRA_ICEBOX_EXPORT ConfiguredIceLoggerPtr createIceLogger(Ice::ObjectAdapterPtr adapter);
 
 } // Logging
 } // System
diff --git a/client/src/LogOut.h b/client/src/LogOut.h
index cb1434b..0384926 100644
--- a/client/src/LogOut.h
+++ b/client/src/LogOut.h
@@ -25,8 +25,8 @@ namespace Logging
 class LogOut
 {
 public:
-   virtual ~LogOut();
-   virtual void logs(std::string const &name, Level logLevel,
+   HYDRA_ICEBOX_EXPORT virtual ~LogOut();
+   HYDRA_ICEBOX_EXPORT virtual void logs(std::string const &name, Level logLevel,
       std::string const &message) = 0;
 };
 
diff --git a/client/src/logger.h b/client/src/logger.h
index f08fabd..85d3fb4 100644
--- a/client/src/logger.h
+++ b/client/src/logger.h
@@ -31,15 +31,15 @@ namespace Logging
 class LogBuf : public std::streambuf
 {
 public:
-   LogBuf(LogOut &out, std::string const &name, Level logLevel);
+   HYDRA_ICEBOX_EXPORT LogBuf(LogOut &out, std::string const &name, Level logLevel);
 
    /**
     * Copy ctor.
     * @param orig Original.
     */
-   LogBuf(LogBuf const &orig);
+   HYDRA_ICEBOX_EXPORT LogBuf(LogBuf const &orig);
 
-   ~LogBuf();
+   HYDRA_ICEBOX_EXPORT ~LogBuf();
 
 protected:
    int overflow(int c);
@@ -135,12 +135,12 @@ public:
    /**
     * Construct a root Logger.
     */
-   Logger(std::string const &name, LogOut &out, Level logLevel = Debug);
+   HYDRA_ICEBOX_EXPORT Logger(std::string const &name, LogOut &out, Level logLevel = Debug);
 
    /**
     * Construct a child Logger.
     */
-   Logger(Logger const &parent, std::string const &name);
+   HYDRA_ICEBOX_EXPORT Logger(Logger const &parent, std::string const &name);
 
    /**
     * If true, this Logger would log messages of the given Level.
@@ -148,7 +148,7 @@ public:
     * @param level Level to check.
     * @return true if enabled for given level.
     */
-   bool isEnabledFor(Level level) const
+   HYDRA_ICEBOX_EXPORT bool isEnabledFor(Level level) const
    {
       return level >= getEffectiveLevel();
    }
@@ -159,58 +159,58 @@ public:
     * @param level Level for messages sent to this stream.
     * @return LogStream that logs at the given level.
     */
-   CondStream operator()(Level level) const;
+   HYDRA_ICEBOX_EXPORT CondStream operator()(Level level) const;
 
    /**
     * Log a single message.
     */
-   void logs(Level level, std::string const &message) const;
+   HYDRA_ICEBOX_EXPORT void logs(Level level, std::string const &message) const;
 
    /**
     * Log a single printf-formatted message.
     */
-   void logf(Level level, char const *fmt, ...) const;
+   HYDRA_ICEBOX_EXPORT 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;
+   HYDRA_ICEBOX_EXPORT void vlogf(Level level, char const *fmt, va_list ap) const;
 
    Logger const *getParent() const
    {
       return parent;
    }
 
-   Logger &getChild(std::string const &childName);
-   std::vector<Logger const *> getChildren() const;
+   HYDRA_ICEBOX_EXPORT Logger &getChild(std::string const &childName);
+   HYDRA_ICEBOX_EXPORT std::vector<Logger const *> getChildren() const;
 
-   std::string const &getName() const
+   HYDRA_ICEBOX_EXPORT std::string const &getName() const
    {
       return name;
    }
 
-   LogOut &getOutput() const
+   HYDRA_ICEBOX_EXPORT LogOut &getOutput() const
    {
       return *out;
    }
 
-   void setOutput(LogOut &out);
+   HYDRA_ICEBOX_EXPORT 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);
+   HYDRA_ICEBOX_EXPORT void setLevel(Level logLevel);
 
    /**
     * Changes our logLevel to now inherit from out parent.
     */
-   void unsetLevel();
+   HYDRA_ICEBOX_EXPORT void unsetLevel();
 
    /**
     * Returns the effective level of this Logger.
     */
-   Level getEffectiveLevel() const;
+   HYDRA_ICEBOX_EXPORT Level getEffectiveLevel() const;
 
 private:
    // non-copyable
@@ -251,7 +251,7 @@ private:
 class LoggerFactory
 {
 public:
-   LoggerFactory(LogOut &out);
+   HYDRA_ICEBOX_EXPORT LoggerFactory(LogOut &out);
 
    /**
     * Will get the Logger with the given name.  If the Logger does not exist,
@@ -261,15 +261,15 @@ public:
     * @return Ref to the Logger.
     * @thread-safe
     */
-   Logger &getLogger(std::string const &name);
+   HYDRA_ICEBOX_EXPORT Logger &getLogger(std::string const &name);
 
    /**
     * Returns a vector of the names of all currently configured Logger's.
     * @return Vector of Logger names.
     */
-   std::vector<std::string> getLoggerNames() const;
+   HYDRA_ICEBOX_EXPORT std::vector<std::string> getLoggerNames() const;
 
-   void setLogOutput(LogOut &out);
+   HYDRA_ICEBOX_EXPORT void setLogOutput(LogOut &out);
 
 private:
    Logger root;
@@ -277,12 +277,12 @@ private:
    static void accumulateLoggerNames(Logger const &logger, std::vector<std::string> &out);
 };
 
-std::auto_ptr<LogOut> buildOstreamLogger(std::ostream &out);
+HYDRA_ICEBOX_EXPORT std::auto_ptr<LogOut> buildOstreamLogger(std::ostream &out);
 
 /**
  * Returns the default configured LoggerFactory.
  */
-LoggerFactory &getLoggerFactory();
+HYDRA_ICEBOX_EXPORT LoggerFactory &getLoggerFactory();
 
 } // Logging
 } // System

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


-- 
asterisk-scf/integration/logger.git



More information about the asterisk-scf-commits mailing list