Mercurial > hg > orthanc
comparison Resources/Samples/CppHelpers/Logging/ILogger.h @ 3473:37e908965e5a
improved detection of threads for ILogger
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Mon, 15 Jul 2019 16:48:23 +0200 |
parents | 4c89b6160563 |
children | eb48adfd931e |
comparison
equal
deleted
inserted
replaced
3471:1fdbe5885783 | 3473:37e908965e5a |
---|---|
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 #if ORTHANC_ENABLE_THREADS == 1 |
40 boost::thread_specific_ptr<std::vector<std::string>> contexts_; | 40 boost::thread_specific_ptr<std::vector<std::string>> contexts_; |
41 #else | 41 #else |
42 std::auto_ptr<std::vector<std::string>> contexts_; | 42 std::auto_ptr<std::vector<std::string>> contexts_; |
43 #endif | 43 #endif |
44 bool logContextChanges_; | 44 bool logContextChanges_; |