Mercurial > hg > orthanc
comparison Resources/Samples/CppHelpers/Logging/ILogger.h @ 3466:b61e74e68d41
fix ILogger in non threaded environment (Emscripten)
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Thu, 11 Jul 2019 10:23:15 +0200 |
parents | fbe22748cd9c |
children | 324f6b966c7a |
comparison
equal
deleted
inserted
replaced
3465:3f1f9039861b | 3466:b61e74e68d41 |
---|---|
34 // Implements ILogger by providing contexts. Contexts defines | 34 // Implements ILogger by providing contexts. Contexts defines |
35 // the "call-stack" of the logs and are prepended to the log. | 35 // the "call-stack" of the logs and are prepended to the log. |
36 // check LogContext class for more details | 36 // check LogContext class for more details |
37 class BaseLogger : public ILogger | 37 class BaseLogger : public ILogger |
38 { | 38 { |
39 #if defined(BOOST_ENABLE_THREADS) | |
39 boost::thread_specific_ptr<std::vector<std::string>> contexts_; | 40 boost::thread_specific_ptr<std::vector<std::string>> contexts_; |
41 #else | |
42 boost::thread_specific_ptr<std::vector<std::string>> contexts_; | |
43 #endif | |
40 bool logContextChanges_; | 44 bool logContextChanges_; |
41 | 45 |
42 public: | 46 public: |
43 | 47 |
44 BaseLogger() | 48 BaseLogger() |