Mercurial > hg > orthanc
comparison Core/Logging.cpp @ 2484:911e62dbb4ac
logging to stdio
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 02 Mar 2018 18:25:07 +0100 |
parents | 9c54c40eaf25 |
children | 0188c21e417a |
comparison
equal
deleted
inserted
replaced
2483:9c54c40eaf25 | 2484:911e62dbb4ac |
---|---|
131 break; | 131 break; |
132 } | 132 } |
133 } | 133 } |
134 } | 134 } |
135 } | 135 } |
136 | |
137 InternalLogger& InternalLogger::operator<< (const std::string& message) | |
138 { | |
139 message_ += message; | |
140 return *this; | |
141 } | |
142 | |
143 InternalLogger& InternalLogger::operator<< (const char* message) | |
144 { | |
145 message_ += std::string(message); | |
146 return *this; | |
147 } | |
148 | |
149 InternalLogger& InternalLogger::operator<< (int message) | |
150 { | |
151 message_ += boost::lexical_cast<std::string>(message); | |
152 return *this; | |
153 } | |
154 } | 136 } |
155 } | 137 } |
156 | 138 |
157 | 139 |
158 #elif ORTHANC_ENABLE_LOGGING_STDIO == 1 | 140 #elif ORTHANC_ENABLE_LOGGING_STDIO == 1 |
207 default: | 189 default: |
208 fprintf(stderr, "Unknown log level (%d) for message: %s\n", level_, message_.c_str()); | 190 fprintf(stderr, "Unknown log level (%d) for message: %s\n", level_, message_.c_str()); |
209 } | 191 } |
210 } | 192 } |
211 | 193 |
212 InternalLogger& InternalLogger::operator<< (const std::string& message) | |
213 { | |
214 message_ += message; | |
215 return *this; | |
216 } | |
217 | |
218 InternalLogger& InternalLogger::operator<< (const char* message) | |
219 { | |
220 message_ += std::string(message); | |
221 return *this; | |
222 } | |
223 | |
224 InternalLogger& InternalLogger::operator<< (int message) | |
225 { | |
226 message_ += boost::lexical_cast<std::string>(message); | |
227 return *this; | |
228 } | |
229 | |
230 void EnableInfoLevel(bool enabled) | 194 void EnableInfoLevel(bool enabled) |
231 { | 195 { |
232 globalVerbose_ = enabled; | 196 globalVerbose_ = enabled; |
233 } | 197 } |
234 | 198 |