diff Sources/StorageArea.cpp @ 171:c8de83fe7faa

removed deprecation warnings
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 27 Jun 2024 15:52:51 +0200
parents 6fada29b6759
children 2db6c1f6417f
line wrap: on
line diff
--- a/Sources/StorageArea.cpp	Thu Jun 27 14:26:59 2024 +0200
+++ b/Sources/StorageArea.cpp	Thu Jun 27 15:52:51 2024 +0200
@@ -40,7 +40,7 @@
   std::string traceback;
   if (lock.HasErrorOccurred(traceback))
   {
-    OrthancPlugins::LogError("Error in the Python " + name + " callback, traceback:\n" + traceback);
+    ORTHANC_PLUGINS_LOG_ERROR("Error in the Python " + name + " callback, traceback:\n" + traceback);
     return OrthancPluginErrorCode_Plugin;
   }
   else
@@ -105,12 +105,12 @@
     std::string traceback;
     if (lock.HasErrorOccurred(traceback))
     {
-      OrthancPlugins::LogError("Error in the Python StorageRead callback, traceback:\n" + traceback);
+      ORTHANC_PLUGINS_LOG_ERROR("Error in the Python StorageRead callback, traceback:\n" + traceback);
       return OrthancPluginErrorCode_Plugin;
     }
     else if (!PyBytes_Check(result.GetPyObject()))
     {
-      OrthancPlugins::LogError("The Python StorageRead callback has not returned a byte array as expected");
+      ORTHANC_PLUGINS_LOG_ERROR("The Python StorageRead callback has not returned a byte array as expected");
       return OrthancPluginErrorCode_Plugin;
     }
     else
@@ -119,7 +119,7 @@
       Py_ssize_t pythonSize = 0;
       if (PyBytes_AsStringAndSize(result.GetPyObject(), &pythonBuffer, &pythonSize) == 1)
       {
-        OrthancPlugins::LogError("Cannot access the byte buffer returned by the Python StorageRead callback");
+        ORTHANC_PLUGINS_LOG_ERROR("Cannot access the byte buffer returned by the Python StorageRead callback");
         return OrthancPluginErrorCode_Plugin;
       }
       else
@@ -204,7 +204,7 @@
   }
   else
   {
-    OrthancPlugins::LogInfo("Registering a custom storage area in Python");
+    ORTHANC_PLUGINS_LOG_INFO("Registering a custom storage area in Python");
 
     OrthancPluginRegisterStorageArea(OrthancPlugins::GetGlobalContext(),
                                      StorageCreate, StorageRead, StorageRemove);