Mercurial > hg > orthanc
comparison Core/Logging.h @ 4003:3c19371090c3
removing useless LoggingMemento
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sat, 06 Jun 2020 11:08:59 +0200 |
parents | 5d5662ff4d5c |
children | 9b5ace33a00d |
comparison
equal
deleted
inserted
replaced
4002:02e61695cd83 | 4003:3c19371090c3 |
---|---|
205 { | 205 { |
206 return (*stream_) << boost::lexical_cast<std::string>(message); | 206 return (*stream_) << boost::lexical_cast<std::string>(message); |
207 } | 207 } |
208 }; | 208 }; |
209 | 209 |
210 /** | |
211 opaque pointer that represents the state of the logging configuration | |
212 */ | |
213 typedef void* LoggingMemento; | |
214 | |
215 /** | |
216 Returns an object that contains the logging configuration. | |
217 | |
218 This function allocates resources that you must dispose of by | |
219 using either RestoreLoggingMemento or DiscardLoggingMemento. | |
220 | |
221 This function is only to be used by tests. | |
222 */ | |
223 ORTHANC_PUBLIC LoggingMemento CreateLoggingMemento(); | |
224 | |
225 /** | |
226 Restores the logging configuration. The logging system is restored in | |
227 the state it was in when the memento object was created through | |
228 GetLoggingMemento(). | |
229 | |
230 After calling this function, the memento object may not be used | |
231 again | |
232 | |
233 This function is only to be used by tests. | |
234 */ | |
235 ORTHANC_PUBLIC void RestoreLoggingMemento(LoggingMemento memento); | |
236 | |
237 /** | |
238 Call this function if you do not plan on restoring the logging | |
239 configuration state that you captured with CreateLoggingMemento | |
240 | |
241 This function is only to be used by tests. | |
242 */ | |
243 ORTHANC_PUBLIC void DiscardLoggingMemento(LoggingMemento memento); | |
244 | 210 |
245 /** | 211 /** |
246 Set custom logging streams for the error, warning and info logs. | 212 Set custom logging streams for the error, warning and info logs. |
247 This function may not be called if a log file or folder has been | 213 This function may not be called if a log file or folder has been |
248 set beforehand. All three pointers must be valid and cannot be NULL. | 214 set beforehand. All three pointers must be valid and cannot be NULL. |