diff OrthancServer/Plugins/Samples/Common/OrthancPluginCppWrapper.h @ 5561:0b18690c1935

SDK: added OrthancPluginLogMessage to display plugin name + file and line from plugin
author Alain Mazy <am@orthanc.team>
date Tue, 23 Apr 2024 09:34:02 +0200
parents 2b3eeacf636c
children f0dc99bc811c
line wrap: on
line diff
--- a/OrthancServer/Plugins/Samples/Common/OrthancPluginCppWrapper.h	Mon Apr 22 10:50:33 2024 +0200
+++ b/OrthancServer/Plugins/Samples/Common/OrthancPluginCppWrapper.h	Tue Apr 23 09:34:02 2024 +0200
@@ -137,6 +137,10 @@
 
   void SetGlobalContext(OrthancPluginContext* context);
 
+#if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 12, 4) && ORTHANC_FRAMEWORK_VERSION_IS_ABOVE(1, 12, 4)
+  void SetGlobalContext(OrthancPluginContext* context, const char* pluginName);
+#endif
+
   void ResetGlobalContext();
 
   bool HasGlobalContext();
@@ -637,11 +641,11 @@
   const char* AutodetectMimeType(const std::string& path);
 #endif
 
-  void LogError(const std::string& message);
+  void LogError(const std::string& message);   // From Orthanc 1.12.4, use LOG(ERROR) to display the plugin name, file and line (First set a plugin name in Orthanc::Logging::InitializePluginContext)
 
-  void LogWarning(const std::string& message);
+  void LogWarning(const std::string& message); // From Orthanc 1.12.4, use LOG(WARNING) to display the plugin name, file and line (First set a plugin name in Orthanc::Logging::InitializePluginContext)
 
-  void LogInfo(const std::string& message);
+  void LogInfo(const std::string& message);    // From Orthanc 1.12.4, use LOG(INFO) to display the plugin name, file and line (First set a plugin name in Orthanc::Logging::InitializePluginContext)
 
   void ReportMinimalOrthancVersion(unsigned int major,
                                    unsigned int minor,