diff Resources/Orthanc/Core/Logging.cpp @ 107:a3e8ac8b7256

support for OpenBSD
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 23 Aug 2017 11:10:48 +0200
parents ff0ef01c332c
children a18bfe1fdd62
line wrap: on
line diff
--- a/Resources/Orthanc/Core/Logging.cpp	Wed Mar 22 15:53:48 2017 +0100
+++ b/Resources/Orthanc/Core/Logging.cpp	Wed Aug 23 11:10:48 2017 +0200
@@ -91,7 +91,7 @@
 
     void Initialize(OrthancPluginContext* context)
     {
-      context_ = context_;
+      context_ = context;
     }
 
     InternalLogger::InternalLogger(const char* level,
@@ -117,6 +117,11 @@
         {
           OrthancPluginLogInfo(context_, message_.c_str());
         }
+        else
+        {
+          std::string s = "Unknown log level (" + level_ + ") for message: " + message_;
+          OrthancPluginLogError(context_, s.c_str());
+        }
       }
     }
 
@@ -156,12 +161,7 @@
 #include <fstream>
 #include <boost/filesystem.hpp>
 #include <boost/thread.hpp>
-
-#if BOOST_HAS_DATE_TIME == 1
-#  include <boost/date_time/posix_time/posix_time.hpp>
-#else
-#  error Boost::date_time is required
-#endif
+#include <boost/date_time/posix_time/posix_time.hpp>
 
 
 namespace