Mercurial > hg > orthanc-wsi
changeset 135:c5c54d5c52e5
fix windows build
author | jodogne |
---|---|
date | Mon, 26 Mar 2018 11:04:50 +0200 |
parents | fe86687b07a5 |
children | 0a1443204818 |
files | Resources/Orthanc/Core/Logging.cpp Resources/Orthanc/Core/Logging.h |
diffstat | 2 files changed, 20 insertions(+), 20 deletions(-) [+] |
line wrap: on
line diff
--- a/Resources/Orthanc/Core/Logging.cpp Mon Mar 26 10:14:20 2018 +0200 +++ b/Resources/Orthanc/Core/Logging.cpp Mon Mar 26 11:04:50 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/Resources/Orthanc/Core/Logging.h Mon Mar 26 10:14:20 2018 +0200 +++ b/Resources/Orthanc/Core/Logging.h Mon Mar 26 11:04:50 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);