comparison Core/Logging.h @ 4004:9b5ace33a00d

cleaning SetErrorWarnInfoLoggingStreams()
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sat, 06 Jun 2020 11:14:10 +0200
parents 3c19371090c3
children 7f9909062d9c
comparison
equal deleted inserted replaced
4003:3c19371090c3 4004:9b5ace33a00d
207 } 207 }
208 }; 208 };
209 209
210 210
211 /** 211 /**
212 Set custom logging streams for the error, warning and info logs. 212 * Set custom logging streams for the error, warning and info
213 This function may not be called if a log file or folder has been 213 * logs. This function may not be called if a log file or folder
214 set beforehand. All three pointers must be valid and cannot be NULL. 214 * has been set beforehand. All three references must be valid.
215 215 *
216 Please ensure the supplied streams remain alive and valid as long as 216 * Please ensure the supplied streams remain alive and valid as
217 logging calls are performed. 217 * long as logging calls are performed. In order to prevent
218 218 * dangling pointer usage, it is mandatory to call
219 In order to prevent dangling pointer usage, it is recommended to call 219 * Orthanc::Logging::Reset() before the stream objects are
220 Orthanc::Logging::Reset() before the stream objects are destroyed and 220 * destroyed and the references become invalid.
221 the pointers become invalid. 221 *
222 */ 222 * This function must only be used by unit tests.
223 ORTHANC_PUBLIC void SetErrorWarnInfoLoggingStreams(std::ostream* errorStream, 223 **/
224 std::ostream* warningStream, 224 ORTHANC_PUBLIC void SetErrorWarnInfoLoggingStreams(std::ostream& errorStream,
225 std::ostream* infoStream); 225 std::ostream& warningStream,
226 std::ostream& infoStream);
226 227
227 #ifdef __EMSCRIPTEN__ 228 #ifdef __EMSCRIPTEN__
228 /** 229 /**
229 This function will change the logging streams so that the logging functions 230 This function will change the logging streams so that the logging functions
230 provided by emscripten html5.h API functions are used : it will change the 231 provided by emscripten html5.h API functions are used : it will change the