annotate Resources/Samples/CppHelpers/Logging/ILogger.h @ 4025:52bc28f8ac8c

merge
author Alain Mazy <alain@mazy.be>
date Tue, 09 Jun 2020 12:21:03 +0200
parents 427a13084241
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3468
4c89b6160563 fix the fix of the fix (this time for good !)
Alain Mazy <alain@mazy.be>
parents: 3467
diff changeset
1 #pragma once
3460
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
2
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
3 #include <string>
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
4 #include <vector>
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
5 #include <boost/algorithm/string.hpp>
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
6 #include <boost/thread.hpp>
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
7
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
8 namespace OrthancHelpers
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
9 {
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
10
3654
427a13084241 OrthancHelpers::ShortenId to display shortened uuid in logs
Alain Mazy <alain@mazy.be>
parents: 3588
diff changeset
11
427a13084241 OrthancHelpers::ShortenId to display shortened uuid in logs
Alain Mazy <alain@mazy.be>
parents: 3588
diff changeset
12 inline std::string ShortenId(const std::string& orthancUuid)
427a13084241 OrthancHelpers::ShortenId to display shortened uuid in logs
Alain Mazy <alain@mazy.be>
parents: 3588
diff changeset
13 {
427a13084241 OrthancHelpers::ShortenId to display shortened uuid in logs
Alain Mazy <alain@mazy.be>
parents: 3588
diff changeset
14 size_t firstHyphenPos = orthancUuid.find_first_of('-');
427a13084241 OrthancHelpers::ShortenId to display shortened uuid in logs
Alain Mazy <alain@mazy.be>
parents: 3588
diff changeset
15 if (firstHyphenPos == std::string::npos)
427a13084241 OrthancHelpers::ShortenId to display shortened uuid in logs
Alain Mazy <alain@mazy.be>
parents: 3588
diff changeset
16 {
427a13084241 OrthancHelpers::ShortenId to display shortened uuid in logs
Alain Mazy <alain@mazy.be>
parents: 3588
diff changeset
17 return orthancUuid;
427a13084241 OrthancHelpers::ShortenId to display shortened uuid in logs
Alain Mazy <alain@mazy.be>
parents: 3588
diff changeset
18 }
427a13084241 OrthancHelpers::ShortenId to display shortened uuid in logs
Alain Mazy <alain@mazy.be>
parents: 3588
diff changeset
19 else
427a13084241 OrthancHelpers::ShortenId to display shortened uuid in logs
Alain Mazy <alain@mazy.be>
parents: 3588
diff changeset
20 {
427a13084241 OrthancHelpers::ShortenId to display shortened uuid in logs
Alain Mazy <alain@mazy.be>
parents: 3588
diff changeset
21 return orthancUuid.substr(0, firstHyphenPos);
427a13084241 OrthancHelpers::ShortenId to display shortened uuid in logs
Alain Mazy <alain@mazy.be>
parents: 3588
diff changeset
22 }
427a13084241 OrthancHelpers::ShortenId to display shortened uuid in logs
Alain Mazy <alain@mazy.be>
parents: 3588
diff changeset
23 }
427a13084241 OrthancHelpers::ShortenId to display shortened uuid in logs
Alain Mazy <alain@mazy.be>
parents: 3588
diff changeset
24
427a13084241 OrthancHelpers::ShortenId to display shortened uuid in logs
Alain Mazy <alain@mazy.be>
parents: 3588
diff changeset
25
3460
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
26 // Interface for loggers providing the same interface
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
27 // in Orthanc framework or in an Orthanc plugins.
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
28 // Furthermore, compared to the LOG and VLOG macros,
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
29 // these loggers will provide "contexts".
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
30 class ILogger
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
31 {
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
32 public:
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
33 virtual ~ILogger() {}
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
34 virtual void Trace(const char* message) = 0;
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
35 virtual void Trace(const std::string& message) = 0;
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
36 virtual void Info(const char* message) = 0;
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
37 virtual void Info(const std::string& message) = 0;
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
38 virtual void Warning(const char* message) = 0;
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
39 virtual void Warning(const std::string& message) = 0;
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
40 virtual void Error(const char* message) = 0;
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
41 virtual void Error(const std::string& message) = 0;
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
42
3588
eb48adfd931e forceLogContextChanges
Alain Mazy <alain@mazy.be>
parents: 3473
diff changeset
43 virtual void EnterContext(const char* message, bool forceLogContextChange = false) = 0;
eb48adfd931e forceLogContextChanges
Alain Mazy <alain@mazy.be>
parents: 3473
diff changeset
44 virtual void EnterContext(const std::string& message, bool forceLogContextChange = false) = 0;
eb48adfd931e forceLogContextChanges
Alain Mazy <alain@mazy.be>
parents: 3473
diff changeset
45 virtual void LeaveContext(bool forceLogContextChange = false) = 0;
3460
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
46 };
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
47
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
48
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
49 // Implements ILogger by providing contexts. Contexts defines
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
50 // the "call-stack" of the logs and are prepended to the log.
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
51 // check LogContext class for more details
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
52 class BaseLogger : public ILogger
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
53 {
3473
37e908965e5a improved detection of threads for ILogger
Alain Mazy <alain@mazy.be>
parents: 3468
diff changeset
54 #if ORTHANC_ENABLE_THREADS == 1
3460
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
55 boost::thread_specific_ptr<std::vector<std::string>> contexts_;
3466
b61e74e68d41 fix ILogger in non threaded environment (Emscripten)
Alain Mazy <alain@mazy.be>
parents: 3460
diff changeset
56 #else
3467
324f6b966c7a fix the fix
Alain Mazy <alain@mazy.be>
parents: 3466
diff changeset
57 std::auto_ptr<std::vector<std::string>> contexts_;
3466
b61e74e68d41 fix ILogger in non threaded environment (Emscripten)
Alain Mazy <alain@mazy.be>
parents: 3460
diff changeset
58 #endif
3460
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
59 bool logContextChanges_;
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
60
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
61 public:
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
62
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
63 BaseLogger()
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
64 : logContextChanges_(false)
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
65 {
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
66 }
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
67
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
68 void EnableLogContextChanges(bool enable)
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
69 {
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
70 logContextChanges_ = enable;
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
71 }
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
72
3588
eb48adfd931e forceLogContextChanges
Alain Mazy <alain@mazy.be>
parents: 3473
diff changeset
73 virtual void EnterContext(const char* message, bool forceLogContextChange = false)
3460
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
74 {
3588
eb48adfd931e forceLogContextChanges
Alain Mazy <alain@mazy.be>
parents: 3473
diff changeset
75 EnterContext(std::string(message), forceLogContextChange);
3460
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
76 }
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
77
3588
eb48adfd931e forceLogContextChanges
Alain Mazy <alain@mazy.be>
parents: 3473
diff changeset
78 virtual void EnterContext(const std::string& message, bool forceLogContextChange = false)
3460
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
79 {
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
80 if (!contexts_.get())
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
81 {
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
82 contexts_.reset(new std::vector<std::string>());
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
83 }
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
84 contexts_->push_back(message);
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
85
3588
eb48adfd931e forceLogContextChanges
Alain Mazy <alain@mazy.be>
parents: 3473
diff changeset
86 if (logContextChanges_ || forceLogContextChange)
3460
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
87 {
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
88 Info(".. entering");
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
89 }
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
90 }
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
91
3588
eb48adfd931e forceLogContextChanges
Alain Mazy <alain@mazy.be>
parents: 3473
diff changeset
92 virtual void LeaveContext(bool forceLogContextChange = false)
3460
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
93 {
3588
eb48adfd931e forceLogContextChanges
Alain Mazy <alain@mazy.be>
parents: 3473
diff changeset
94 if (logContextChanges_ || forceLogContextChange)
3460
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
95 {
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
96 Info(".. leaving");
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
97 }
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
98
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
99 contexts_->pop_back();
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
100 if (contexts_->size() == 0)
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
101 {
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
102 contexts_.reset(NULL);
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
103 }
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
104 }
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
105
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
106 protected:
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
107
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
108 virtual std::string GetContext()
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
109 {
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
110 if (contexts_.get() != NULL && contexts_->size() > 0)
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
111 {
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
112 return "|" + boost::algorithm::join(*contexts_, " | ") + "|";
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
113 }
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
114 else
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
115 {
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
116 return std::string("|");
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
117 }
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
118 }
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
119 };
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
120
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
121
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
122 /* RAII to set a Log context.
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
123 * Example:
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
124 * ILogger* logger = new OrthancPluginLogger(..);
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
125 * {
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
126 * LogContext logContext(logger, "A");
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
127 * {
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
128 * LogContext nestedLogContext(logger, "B");
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
129 * logger->Error("out of memory");
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
130 * }
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
131 * }
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
132 * will produce:
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
133 * |A | B| out of memory
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
134 *
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
135 * furthermore, if LogContextChanges are enabled in the BaseLogger,
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
136 * you'll get;
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
137 * |A| .. entering
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
138 * |A | B| .. entering
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
139 * |A | B| out of memory
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
140 * |A | B| .. leaving
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
141 * |A| .. leaving
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
142 */
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
143 class LogContext
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
144 {
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
145 ILogger* logger_;
3588
eb48adfd931e forceLogContextChanges
Alain Mazy <alain@mazy.be>
parents: 3473
diff changeset
146 bool forceLogContextChange_;
3460
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
147 public:
3588
eb48adfd931e forceLogContextChanges
Alain Mazy <alain@mazy.be>
parents: 3473
diff changeset
148 LogContext(ILogger* logger, const char* context, bool forceLogContextChange = false) :
eb48adfd931e forceLogContextChanges
Alain Mazy <alain@mazy.be>
parents: 3473
diff changeset
149 logger_(logger),
eb48adfd931e forceLogContextChanges
Alain Mazy <alain@mazy.be>
parents: 3473
diff changeset
150 forceLogContextChange_(forceLogContextChange)
3460
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
151 {
3588
eb48adfd931e forceLogContextChanges
Alain Mazy <alain@mazy.be>
parents: 3473
diff changeset
152 logger_->EnterContext(context, forceLogContextChange_);
3460
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
153 }
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
154
3588
eb48adfd931e forceLogContextChanges
Alain Mazy <alain@mazy.be>
parents: 3473
diff changeset
155 LogContext(ILogger* logger, const std::string& context, bool forceLogContextChange = false) :
eb48adfd931e forceLogContextChanges
Alain Mazy <alain@mazy.be>
parents: 3473
diff changeset
156 logger_(logger),
eb48adfd931e forceLogContextChanges
Alain Mazy <alain@mazy.be>
parents: 3473
diff changeset
157 forceLogContextChange_(forceLogContextChange)
3460
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
158 {
3588
eb48adfd931e forceLogContextChanges
Alain Mazy <alain@mazy.be>
parents: 3473
diff changeset
159 logger_->EnterContext(context, forceLogContextChange_);
3460
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
160 }
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
161
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
162 ~LogContext()
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
163 {
3588
eb48adfd931e forceLogContextChanges
Alain Mazy <alain@mazy.be>
parents: 3473
diff changeset
164 logger_->LeaveContext(forceLogContextChange_);
3460
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
165 }
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
166
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
167 };
fbe22748cd9c added logging OrthancHelpers
Alain Mazy <alain@mazy.be>
parents:
diff changeset
168 }