Mercurial > hg > orthanc-python
diff Sources/Plugin.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 | e9be3c9294d4 |
line wrap: on
line diff
--- a/Sources/Plugin.cpp Thu Jun 27 14:26:59 2024 +0200 +++ b/Sources/Plugin.cpp Thu Jun 27 15:52:51 2024 +0200 @@ -491,7 +491,7 @@ if (module.find("python") != std::string::npos) { - OrthancPlugins::LogWarning("Force global loading of Python shared library: " + module); + ORTHANC_PLUGINS_LOG_WARNING("Force global loading of Python shared library: " + module); dlopen(module.c_str(), RTLD_NOW | RTLD_LAZY | RTLD_GLOBAL); } @@ -527,7 +527,7 @@ ORTHANC_PLUGINS_API int32_t OrthancPluginInitialize(OrthancPluginContext* c) { OrthancPlugins::SetGlobalContext(c); - OrthancPlugins::LogWarning("Python plugin is initializing"); + ORTHANC_PLUGINS_LOG_WARNING("Python plugin is initializing"); /* Check the version of the Orthanc core */ @@ -562,8 +562,8 @@ { pythonEnabled_ = false; - OrthancPlugins::LogWarning("Options \"PythonScript\" and \"Python.Path\" are not provided: " - "Python scripting is disabled"); + ORTHANC_PLUGINS_LOG_WARNING("Options \"PythonScript\" and \"Python.Path\" are not provided: " + "Python scripting is disabled"); } else { @@ -576,15 +576,15 @@ const boost::filesystem::path path(script); if (!boost::iequals(path.extension().string(), ".py")) { - OrthancPlugins::LogError("Python script must have the \".py\" file extension: " + - path.string()); + ORTHANC_PLUGINS_LOG_ERROR("Python script must have the \".py\" file extension: " + + path.string()); return -1; } if (!boost::filesystem::is_regular_file(path)) { - OrthancPlugins::LogError("Inexistent directory for the Python script: " + - path.string()); + ORTHANC_PLUGINS_LOG_ERROR("Inexistent directory for the Python script: " + + path.string()); return -1; } @@ -595,8 +595,8 @@ userScriptName_ = module.string(); } - OrthancPlugins::LogWarning("Using Python script \"" + userScriptName_ + - ".py\" from directory: " + userScriptDirectory.string()); + ORTHANC_PLUGINS_LOG_WARNING("Using Python script \"" + userScriptName_ + + ".py\" from directory: " + userScriptDirectory.string()); /** @@ -633,16 +633,16 @@ std::string traceback; if (lock.HasErrorOccurred(traceback)) { - OrthancPlugins::LogError("Error during the installation of the Python script, " - "traceback:\n" + traceback); + ORTHANC_PLUGINS_LOG_ERROR("Error during the installation of the Python script, " + "traceback:\n" + traceback); return -1; } } } catch (ORTHANC_PLUGINS_EXCEPTION_CLASS& e) { - OrthancPlugins::LogError("Exception while starting the Python plugin: " + - std::string(e.What(c))); + ORTHANC_PLUGINS_LOG_ERROR("Exception while starting the Python plugin: " + + std::string(e.What(c))); return -1; } @@ -652,7 +652,7 @@ ORTHANC_PLUGINS_API void OrthancPluginFinalize() { - OrthancPlugins::LogWarning("Python plugin is finalizing"); + ORTHANC_PLUGINS_LOG_WARNING("Python plugin is finalizing"); if (pythonEnabled_) {