Mercurial > hg > orthanc
changeset 2505:a4f885670da7
fix Windows build
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 26 Mar 2018 11:09:19 +0200 |
parents | 78862372ea88 |
children | 51b91ead6c38 |
files | Core/Logging.cpp Core/Logging.h INSTALL |
diffstat | 3 files changed, 21 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/Core/Logging.cpp Mon Mar 26 10:13:50 2018 +0200 +++ b/Core/Logging.cpp Mon Mar 26 11:09:19 2018 +0200 @@ -94,7 +94,7 @@ context_ = context; } - InternalLogger::InternalLogger(Level level, + InternalLogger::InternalLogger(InternalLevel level, const char* file /* ignored */, int line /* ignored */) : level_(level) @@ -107,19 +107,19 @@ { switch (level_) { - case ERROR: + case InternalLevel_ERROR: OrthancPluginLogError(context_, message_.c_str()); break; - case WARNING: + case InternalLevel_WARNING: OrthancPluginLogWarning(context_, message_.c_str()); break; - case INFO: + case InternalLevel_INFO: OrthancPluginLogInfo(context_, message_.c_str()); break; - case TRACE: + case InternalLevel_TRACE: // Not used by plugins break; @@ -153,7 +153,7 @@ static bool globalVerbose_ = false; static bool globalTrace_ = false; - InternalLogger::InternalLogger(Level level, + InternalLogger::InternalLogger(InternalLevel level, const char* file /* ignored */, int line /* ignored */) : level_(level) @@ -164,22 +164,22 @@ { switch (level_) { - case ERROR: + case InternalLevel_ERROR: fprintf(stderr, "E: %s\n", message_.c_str()); break; - case WARNING: + case InternalLevel_WARNING: fprintf(stdout, "W: %s\n", message_.c_str()); break; - case INFO: + case InternalLevel_INFO: if (globalVerbose_) { fprintf(stdout, "I: %s\n", message_.c_str()); } break; - case TRACE: + case InternalLevel_TRACE: if (globalTrace_) { fprintf(stdout, "T: %s\n", message_.c_str());
--- a/Core/Logging.h Mon Mar 26 10:13:50 2018 +0200 +++ b/Core/Logging.h Mon Mar 26 11:09:19 2018 +0200 @@ -114,30 +114,30 @@ # include <boost/noncopyable.hpp> # define LOG(level) ::Orthanc::Logging::InternalLogger \ - (::Orthanc::Logging::level, __FILE__, __LINE__) + (::Orthanc::Logging::InternalLevel_ ## level, __FILE__, __LINE__) # define VLOG(level) ::Orthanc::Logging::InternalLogger \ - (::Orthanc::Logging::TRACE, __FILE__, __LINE__) + (::Orthanc::Logging::InternalLevel_TRACE, __FILE__, __LINE__) namespace Orthanc { namespace Logging { - enum Level + enum InternalLevel { - ERROR, - WARNING, - INFO, - TRACE + InternalLevel_ERROR, + InternalLevel_WARNING, + InternalLevel_INFO, + InternalLevel_TRACE }; class InternalLogger : public boost::noncopyable { private: - Level level_; - std::string message_; + InternalLevel level_; + std::string message_; public: - InternalLogger(Level level, + InternalLogger(InternalLevel level, const char* file, int line);
--- a/INSTALL Mon Mar 26 10:13:50 2018 +0200 +++ b/INSTALL Mon Mar 26 11:09:19 2018 +0200 @@ -75,7 +75,7 @@ ------------------------------------------------- # cd [...]\OrthancBuild -# cmake -DSTANDALONE_BUILD=ON -DSTATIC_BUILD=ON -DALLOW_DOWNLOADS=ON -DUSE_LEGACY_JSONCPP=ON -G "Visual Studio 8 2008" [...]\Orthanc +# cmake -DSTANDALONE_BUILD=ON -DSTATIC_BUILD=ON -DALLOW_DOWNLOADS=ON -DUSE_LEGACY_JSONCPP=ON -G "Visual Studio 9 2008" [...]\Orthanc Then open the "[...]/OrthancBuild/Orthanc.sln" with Visual Studio.