Mercurial > hg > orthanc
changeset 6544:3e52a722447a default tip
fix logging from plugins
| author | Alain Mazy <am@orthanc.team> |
|---|---|
| date | Thu, 11 Dec 2025 14:59:10 +0100 |
| parents | d12e34b27f11 |
| children | |
| files | OrthancFramework/Sources/Logging.cpp OrthancFramework/Sources/Logging.h |
| diffstat | 2 files changed, 2 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/OrthancFramework/Sources/Logging.cpp Wed Dec 10 12:03:31 2025 +0100 +++ b/OrthancFramework/Sources/Logging.cpp Thu Dec 11 14:59:10 2025 +0100 @@ -935,11 +935,6 @@ // set to "/dev/null" return; } - else - { - pluginStream_.reset(new std::stringstream); - stream_ = pluginStream_.get(); - } } else { @@ -1017,11 +1012,11 @@ InternalLogger::~InternalLogger() { - if (pluginStream_.get() != NULL) + if (pluginContext_ != NULL) { // We are logging through the Orthanc SDK - std::string message = pluginStream_->str(); + std::string message = messageStream_.str(); if (pluginContext_ != NULL) {
--- a/OrthancFramework/Sources/Logging.h Wed Dec 10 12:03:31 2025 +0100 +++ b/OrthancFramework/Sources/Logging.h Thu Dec 11 14:59:10 2025 +0100 @@ -282,7 +282,6 @@ private: boost::mutex::scoped_lock lock_; LogLevel level_; - std::unique_ptr<std::stringstream> pluginStream_; std::ostream* stream_; LogCategory category_; const char* file_;
