# HG changeset patch # User Alain Mazy # Date 1765461550 -3600 # Node ID 3e52a722447afca487a4a4725b783339f92db330 # Parent d12e34b27f11cad832a1dd321a9900f0258f53e4 fix logging from plugins diff -r d12e34b27f11 -r 3e52a722447a OrthancFramework/Sources/Logging.cpp --- 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) { diff -r d12e34b27f11 -r 3e52a722447a OrthancFramework/Sources/Logging.h --- 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 pluginStream_; std::ostream* stream_; LogCategory category_; const char* file_;