Mercurial > hg > orthanc
comparison Core/Logging.cpp @ 2253:441352e7a9d1
fix
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 25 Jan 2017 14:16:46 +0100 |
parents | a3a65de1840f |
children | 2aff870c2c58 |
comparison
equal
deleted
inserted
replaced
2252:002b94046c69 | 2253:441352e7a9d1 |
---|---|
89 { | 89 { |
90 static OrthancPluginContext* context_ = NULL; | 90 static OrthancPluginContext* context_ = NULL; |
91 | 91 |
92 void Initialize(OrthancPluginContext* context) | 92 void Initialize(OrthancPluginContext* context) |
93 { | 93 { |
94 context_ = context_; | 94 context_ = context; |
95 } | 95 } |
96 | 96 |
97 InternalLogger::InternalLogger(const char* level, | 97 InternalLogger::InternalLogger(const char* level, |
98 const char* file /* ignored */, | 98 const char* file /* ignored */, |
99 int line /* ignored */) : | 99 int line /* ignored */) : |
114 OrthancPluginLogWarning(context_, message_.c_str()); | 114 OrthancPluginLogWarning(context_, message_.c_str()); |
115 } | 115 } |
116 else if (level_ == "INFO") | 116 else if (level_ == "INFO") |
117 { | 117 { |
118 OrthancPluginLogInfo(context_, message_.c_str()); | 118 OrthancPluginLogInfo(context_, message_.c_str()); |
119 } | |
120 else | |
121 { | |
122 std::string s = "Unknown log level (" + level_ + ") for message: " + message_; | |
123 OrthancPluginLogError(context_, s.c_str()); | |
119 } | 124 } |
120 } | 125 } |
121 } | 126 } |
122 | 127 |
123 InternalLogger& InternalLogger::operator<< (const std::string& message) | 128 InternalLogger& InternalLogger::operator<< (const std::string& message) |