# HG changeset patch # User Sebastien Jodogne # Date 1719496371 -7200 # Node ID c8de83fe7faaaeb622e33f096e70f17669ea4ef9 # Parent b49eeb36cd0d54d902679d4bccbfdcdb04fe8f66 removed deprecation warnings diff -r b49eeb36cd0d -r c8de83fe7faa CMakeLists.txt --- a/CMakeLists.txt Thu Jun 27 14:26:59 2024 +0200 +++ b/CMakeLists.txt Thu Jun 27 15:52:51 2024 +0200 @@ -196,6 +196,13 @@ ${WINDOWS_RESOURCES} ) +if (CMAKE_COMPILER_IS_GNUCXX) + # Don't report warnings about deprecated functions in the Orthanc SDK + set_source_files_properties( + Sources/Autogenerated/sdk.cpp + PROPERTIES COMPILE_FLAGS -Wno-deprecated-declarations) +endif() + target_link_libraries(OrthancPython ${PYTHON_LIBRARIES}) add_definitions( @@ -213,3 +220,7 @@ RUNTIME DESTINATION lib # Destination for Windows LIBRARY DESTINATION share/orthanc/plugins # Destination for Linux ) + +if (COMMAND DefineSourceBasenameForTarget) + DefineSourceBasenameForTarget(OrthancPython) +endif() diff -r b49eeb36cd0d -r c8de83fe7faa CodeAnalysis/Class.mustache --- a/CodeAnalysis/Class.mustache Thu Jun 27 14:26:59 2024 +0200 +++ b/CodeAnalysis/Class.mustache Thu Jun 27 15:52:51 2024 +0200 @@ -127,14 +127,14 @@ if (PyType_Ready(&sdk_{{class_name}}_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python class: {{class_name}}"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python class: {{class_name}}"); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } Py_INCREF(&sdk_{{class_name}}_Type); if (PyModule_AddObject(module, "{{short_name}}", (PyObject *)&sdk_{{class_name}}_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python class: {{class_name}}"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python class: {{class_name}}"); Py_DECREF(&sdk_{{class_name}}_Type); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } diff -r b49eeb36cd0d -r c8de83fe7faa CodeAnalysis/Enumeration.mustache --- a/CodeAnalysis/Enumeration.mustache Thu Jun 27 14:26:59 2024 +0200 +++ b/CodeAnalysis/Enumeration.mustache Thu Jun 27 15:52:51 2024 +0200 @@ -47,7 +47,7 @@ if (PyType_Ready(&sdk_{{name}}_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python enumeration: {{name}}"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python enumeration: {{name}}"); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } @@ -77,7 +77,7 @@ Py_INCREF(&sdk_{{name}}_Type); if (PyModule_AddObject(module, "{{short_name}}", (PyObject *)&sdk_{{name}}_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python enumeration: {{name}}"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python enumeration: {{name}}"); Py_DECREF(&sdk_{{name}}_Type); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } diff -r b49eeb36cd0d -r c8de83fe7faa Sources/Autogenerated/sdk_OrthancPluginChangeType.impl.h --- a/Sources/Autogenerated/sdk_OrthancPluginChangeType.impl.h Thu Jun 27 14:26:59 2024 +0200 +++ b/Sources/Autogenerated/sdk_OrthancPluginChangeType.impl.h Thu Jun 27 15:52:51 2024 +0200 @@ -47,7 +47,7 @@ if (PyType_Ready(&sdk_OrthancPluginChangeType_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python enumeration: OrthancPluginChangeType"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python enumeration: OrthancPluginChangeType"); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } @@ -183,7 +183,7 @@ Py_INCREF(&sdk_OrthancPluginChangeType_Type); if (PyModule_AddObject(module, "ChangeType", (PyObject *)&sdk_OrthancPluginChangeType_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python enumeration: OrthancPluginChangeType"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python enumeration: OrthancPluginChangeType"); Py_DECREF(&sdk_OrthancPluginChangeType_Type); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } diff -r b49eeb36cd0d -r c8de83fe7faa Sources/Autogenerated/sdk_OrthancPluginCompressionType.impl.h --- a/Sources/Autogenerated/sdk_OrthancPluginCompressionType.impl.h Thu Jun 27 14:26:59 2024 +0200 +++ b/Sources/Autogenerated/sdk_OrthancPluginCompressionType.impl.h Thu Jun 27 15:52:51 2024 +0200 @@ -47,7 +47,7 @@ if (PyType_Ready(&sdk_OrthancPluginCompressionType_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python enumeration: OrthancPluginCompressionType"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python enumeration: OrthancPluginCompressionType"); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } @@ -93,7 +93,7 @@ Py_INCREF(&sdk_OrthancPluginCompressionType_Type); if (PyModule_AddObject(module, "CompressionType", (PyObject *)&sdk_OrthancPluginCompressionType_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python enumeration: OrthancPluginCompressionType"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python enumeration: OrthancPluginCompressionType"); Py_DECREF(&sdk_OrthancPluginCompressionType_Type); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } diff -r b49eeb36cd0d -r c8de83fe7faa Sources/Autogenerated/sdk_OrthancPluginConstraintType.impl.h --- a/Sources/Autogenerated/sdk_OrthancPluginConstraintType.impl.h Thu Jun 27 14:26:59 2024 +0200 +++ b/Sources/Autogenerated/sdk_OrthancPluginConstraintType.impl.h Thu Jun 27 15:52:51 2024 +0200 @@ -47,7 +47,7 @@ if (PyType_Ready(&sdk_OrthancPluginConstraintType_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python enumeration: OrthancPluginConstraintType"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python enumeration: OrthancPluginConstraintType"); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } @@ -99,7 +99,7 @@ Py_INCREF(&sdk_OrthancPluginConstraintType_Type); if (PyModule_AddObject(module, "ConstraintType", (PyObject *)&sdk_OrthancPluginConstraintType_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python enumeration: OrthancPluginConstraintType"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python enumeration: OrthancPluginConstraintType"); Py_DECREF(&sdk_OrthancPluginConstraintType_Type); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } diff -r b49eeb36cd0d -r c8de83fe7faa Sources/Autogenerated/sdk_OrthancPluginContentType.impl.h --- a/Sources/Autogenerated/sdk_OrthancPluginContentType.impl.h Thu Jun 27 14:26:59 2024 +0200 +++ b/Sources/Autogenerated/sdk_OrthancPluginContentType.impl.h Thu Jun 27 15:52:51 2024 +0200 @@ -47,7 +47,7 @@ if (PyType_Ready(&sdk_OrthancPluginContentType_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python enumeration: OrthancPluginContentType"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python enumeration: OrthancPluginContentType"); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } @@ -93,7 +93,7 @@ Py_INCREF(&sdk_OrthancPluginContentType_Type); if (PyModule_AddObject(module, "ContentType", (PyObject *)&sdk_OrthancPluginContentType_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python enumeration: OrthancPluginContentType"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python enumeration: OrthancPluginContentType"); Py_DECREF(&sdk_OrthancPluginContentType_Type); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } diff -r b49eeb36cd0d -r c8de83fe7faa Sources/Autogenerated/sdk_OrthancPluginCreateDicomFlags.impl.h --- a/Sources/Autogenerated/sdk_OrthancPluginCreateDicomFlags.impl.h Thu Jun 27 14:26:59 2024 +0200 +++ b/Sources/Autogenerated/sdk_OrthancPluginCreateDicomFlags.impl.h Thu Jun 27 15:52:51 2024 +0200 @@ -47,7 +47,7 @@ if (PyType_Ready(&sdk_OrthancPluginCreateDicomFlags_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python enumeration: OrthancPluginCreateDicomFlags"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python enumeration: OrthancPluginCreateDicomFlags"); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } @@ -87,7 +87,7 @@ Py_INCREF(&sdk_OrthancPluginCreateDicomFlags_Type); if (PyModule_AddObject(module, "CreateDicomFlags", (PyObject *)&sdk_OrthancPluginCreateDicomFlags_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python enumeration: OrthancPluginCreateDicomFlags"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python enumeration: OrthancPluginCreateDicomFlags"); Py_DECREF(&sdk_OrthancPluginCreateDicomFlags_Type); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } diff -r b49eeb36cd0d -r c8de83fe7faa Sources/Autogenerated/sdk_OrthancPluginDicomInstance.impl.h --- a/Sources/Autogenerated/sdk_OrthancPluginDicomInstance.impl.h Thu Jun 27 14:26:59 2024 +0200 +++ b/Sources/Autogenerated/sdk_OrthancPluginDicomInstance.impl.h Thu Jun 27 15:52:51 2024 +0200 @@ -180,14 +180,14 @@ if (PyType_Ready(&sdk_OrthancPluginDicomInstance_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python class: OrthancPluginDicomInstance"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python class: OrthancPluginDicomInstance"); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } Py_INCREF(&sdk_OrthancPluginDicomInstance_Type); if (PyModule_AddObject(module, "DicomInstance", (PyObject *)&sdk_OrthancPluginDicomInstance_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python class: OrthancPluginDicomInstance"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python class: OrthancPluginDicomInstance"); Py_DECREF(&sdk_OrthancPluginDicomInstance_Type); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } diff -r b49eeb36cd0d -r c8de83fe7faa Sources/Autogenerated/sdk_OrthancPluginDicomToJsonFlags.impl.h --- a/Sources/Autogenerated/sdk_OrthancPluginDicomToJsonFlags.impl.h Thu Jun 27 14:26:59 2024 +0200 +++ b/Sources/Autogenerated/sdk_OrthancPluginDicomToJsonFlags.impl.h Thu Jun 27 15:52:51 2024 +0200 @@ -47,7 +47,7 @@ if (PyType_Ready(&sdk_OrthancPluginDicomToJsonFlags_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python enumeration: OrthancPluginDicomToJsonFlags"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python enumeration: OrthancPluginDicomToJsonFlags"); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } @@ -123,7 +123,7 @@ Py_INCREF(&sdk_OrthancPluginDicomToJsonFlags_Type); if (PyModule_AddObject(module, "DicomToJsonFlags", (PyObject *)&sdk_OrthancPluginDicomToJsonFlags_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python enumeration: OrthancPluginDicomToJsonFlags"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python enumeration: OrthancPluginDicomToJsonFlags"); Py_DECREF(&sdk_OrthancPluginDicomToJsonFlags_Type); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } diff -r b49eeb36cd0d -r c8de83fe7faa Sources/Autogenerated/sdk_OrthancPluginDicomToJsonFormat.impl.h --- a/Sources/Autogenerated/sdk_OrthancPluginDicomToJsonFormat.impl.h Thu Jun 27 14:26:59 2024 +0200 +++ b/Sources/Autogenerated/sdk_OrthancPluginDicomToJsonFormat.impl.h Thu Jun 27 15:52:51 2024 +0200 @@ -47,7 +47,7 @@ if (PyType_Ready(&sdk_OrthancPluginDicomToJsonFormat_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python enumeration: OrthancPluginDicomToJsonFormat"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python enumeration: OrthancPluginDicomToJsonFormat"); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } @@ -87,7 +87,7 @@ Py_INCREF(&sdk_OrthancPluginDicomToJsonFormat_Type); if (PyModule_AddObject(module, "DicomToJsonFormat", (PyObject *)&sdk_OrthancPluginDicomToJsonFormat_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python enumeration: OrthancPluginDicomToJsonFormat"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python enumeration: OrthancPluginDicomToJsonFormat"); Py_DECREF(&sdk_OrthancPluginDicomToJsonFormat_Type); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } diff -r b49eeb36cd0d -r c8de83fe7faa Sources/Autogenerated/sdk_OrthancPluginDicomWebBinaryMode.impl.h --- a/Sources/Autogenerated/sdk_OrthancPluginDicomWebBinaryMode.impl.h Thu Jun 27 14:26:59 2024 +0200 +++ b/Sources/Autogenerated/sdk_OrthancPluginDicomWebBinaryMode.impl.h Thu Jun 27 15:52:51 2024 +0200 @@ -47,7 +47,7 @@ if (PyType_Ready(&sdk_OrthancPluginDicomWebBinaryMode_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python enumeration: OrthancPluginDicomWebBinaryMode"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python enumeration: OrthancPluginDicomWebBinaryMode"); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } @@ -87,7 +87,7 @@ Py_INCREF(&sdk_OrthancPluginDicomWebBinaryMode_Type); if (PyModule_AddObject(module, "DicomWebBinaryMode", (PyObject *)&sdk_OrthancPluginDicomWebBinaryMode_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python enumeration: OrthancPluginDicomWebBinaryMode"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python enumeration: OrthancPluginDicomWebBinaryMode"); Py_DECREF(&sdk_OrthancPluginDicomWebBinaryMode_Type); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } diff -r b49eeb36cd0d -r c8de83fe7faa Sources/Autogenerated/sdk_OrthancPluginDicomWebNode.impl.h --- a/Sources/Autogenerated/sdk_OrthancPluginDicomWebNode.impl.h Thu Jun 27 14:26:59 2024 +0200 +++ b/Sources/Autogenerated/sdk_OrthancPluginDicomWebNode.impl.h Thu Jun 27 15:52:51 2024 +0200 @@ -82,14 +82,14 @@ if (PyType_Ready(&sdk_OrthancPluginDicomWebNode_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python class: OrthancPluginDicomWebNode"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python class: OrthancPluginDicomWebNode"); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } Py_INCREF(&sdk_OrthancPluginDicomWebNode_Type); if (PyModule_AddObject(module, "DicomWebNode", (PyObject *)&sdk_OrthancPluginDicomWebNode_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python class: OrthancPluginDicomWebNode"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python class: OrthancPluginDicomWebNode"); Py_DECREF(&sdk_OrthancPluginDicomWebNode_Type); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } diff -r b49eeb36cd0d -r c8de83fe7faa Sources/Autogenerated/sdk_OrthancPluginErrorCode.impl.h --- a/Sources/Autogenerated/sdk_OrthancPluginErrorCode.impl.h Thu Jun 27 14:26:59 2024 +0200 +++ b/Sources/Autogenerated/sdk_OrthancPluginErrorCode.impl.h Thu Jun 27 15:52:51 2024 +0200 @@ -47,7 +47,7 @@ if (PyType_Ready(&sdk_OrthancPluginErrorCode_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python enumeration: OrthancPluginErrorCode"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python enumeration: OrthancPluginErrorCode"); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } @@ -711,7 +711,7 @@ Py_INCREF(&sdk_OrthancPluginErrorCode_Type); if (PyModule_AddObject(module, "ErrorCode", (PyObject *)&sdk_OrthancPluginErrorCode_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python enumeration: OrthancPluginErrorCode"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python enumeration: OrthancPluginErrorCode"); Py_DECREF(&sdk_OrthancPluginErrorCode_Type); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } diff -r b49eeb36cd0d -r c8de83fe7faa Sources/Autogenerated/sdk_OrthancPluginFindAnswers.impl.h --- a/Sources/Autogenerated/sdk_OrthancPluginFindAnswers.impl.h Thu Jun 27 14:26:59 2024 +0200 +++ b/Sources/Autogenerated/sdk_OrthancPluginFindAnswers.impl.h Thu Jun 27 15:52:51 2024 +0200 @@ -92,14 +92,14 @@ if (PyType_Ready(&sdk_OrthancPluginFindAnswers_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python class: OrthancPluginFindAnswers"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python class: OrthancPluginFindAnswers"); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } Py_INCREF(&sdk_OrthancPluginFindAnswers_Type); if (PyModule_AddObject(module, "FindAnswers", (PyObject *)&sdk_OrthancPluginFindAnswers_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python class: OrthancPluginFindAnswers"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python class: OrthancPluginFindAnswers"); Py_DECREF(&sdk_OrthancPluginFindAnswers_Type); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } diff -r b49eeb36cd0d -r c8de83fe7faa Sources/Autogenerated/sdk_OrthancPluginFindMatcher.impl.h --- a/Sources/Autogenerated/sdk_OrthancPluginFindMatcher.impl.h Thu Jun 27 14:26:59 2024 +0200 +++ b/Sources/Autogenerated/sdk_OrthancPluginFindMatcher.impl.h Thu Jun 27 15:52:51 2024 +0200 @@ -110,14 +110,14 @@ if (PyType_Ready(&sdk_OrthancPluginFindMatcher_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python class: OrthancPluginFindMatcher"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python class: OrthancPluginFindMatcher"); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } Py_INCREF(&sdk_OrthancPluginFindMatcher_Type); if (PyModule_AddObject(module, "FindMatcher", (PyObject *)&sdk_OrthancPluginFindMatcher_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python class: OrthancPluginFindMatcher"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python class: OrthancPluginFindMatcher"); Py_DECREF(&sdk_OrthancPluginFindMatcher_Type); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } diff -r b49eeb36cd0d -r c8de83fe7faa Sources/Autogenerated/sdk_OrthancPluginFindQuery.impl.h --- a/Sources/Autogenerated/sdk_OrthancPluginFindQuery.impl.h Thu Jun 27 14:26:59 2024 +0200 +++ b/Sources/Autogenerated/sdk_OrthancPluginFindQuery.impl.h Thu Jun 27 15:52:51 2024 +0200 @@ -107,14 +107,14 @@ if (PyType_Ready(&sdk_OrthancPluginFindQuery_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python class: OrthancPluginFindQuery"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python class: OrthancPluginFindQuery"); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } Py_INCREF(&sdk_OrthancPluginFindQuery_Type); if (PyModule_AddObject(module, "FindQuery", (PyObject *)&sdk_OrthancPluginFindQuery_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python class: OrthancPluginFindQuery"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python class: OrthancPluginFindQuery"); Py_DECREF(&sdk_OrthancPluginFindQuery_Type); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } diff -r b49eeb36cd0d -r c8de83fe7faa Sources/Autogenerated/sdk_OrthancPluginHttpMethod.impl.h --- a/Sources/Autogenerated/sdk_OrthancPluginHttpMethod.impl.h Thu Jun 27 14:26:59 2024 +0200 +++ b/Sources/Autogenerated/sdk_OrthancPluginHttpMethod.impl.h Thu Jun 27 15:52:51 2024 +0200 @@ -47,7 +47,7 @@ if (PyType_Ready(&sdk_OrthancPluginHttpMethod_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python enumeration: OrthancPluginHttpMethod"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python enumeration: OrthancPluginHttpMethod"); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } @@ -93,7 +93,7 @@ Py_INCREF(&sdk_OrthancPluginHttpMethod_Type); if (PyModule_AddObject(module, "HttpMethod", (PyObject *)&sdk_OrthancPluginHttpMethod_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python enumeration: OrthancPluginHttpMethod"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python enumeration: OrthancPluginHttpMethod"); Py_DECREF(&sdk_OrthancPluginHttpMethod_Type); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } diff -r b49eeb36cd0d -r c8de83fe7faa Sources/Autogenerated/sdk_OrthancPluginIdentifierConstraint.impl.h --- a/Sources/Autogenerated/sdk_OrthancPluginIdentifierConstraint.impl.h Thu Jun 27 14:26:59 2024 +0200 +++ b/Sources/Autogenerated/sdk_OrthancPluginIdentifierConstraint.impl.h Thu Jun 27 15:52:51 2024 +0200 @@ -47,7 +47,7 @@ if (PyType_Ready(&sdk_OrthancPluginIdentifierConstraint_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python enumeration: OrthancPluginIdentifierConstraint"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python enumeration: OrthancPluginIdentifierConstraint"); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } @@ -93,7 +93,7 @@ Py_INCREF(&sdk_OrthancPluginIdentifierConstraint_Type); if (PyModule_AddObject(module, "IdentifierConstraint", (PyObject *)&sdk_OrthancPluginIdentifierConstraint_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python enumeration: OrthancPluginIdentifierConstraint"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python enumeration: OrthancPluginIdentifierConstraint"); Py_DECREF(&sdk_OrthancPluginIdentifierConstraint_Type); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } diff -r b49eeb36cd0d -r c8de83fe7faa Sources/Autogenerated/sdk_OrthancPluginImage.impl.h --- a/Sources/Autogenerated/sdk_OrthancPluginImage.impl.h Thu Jun 27 14:26:59 2024 +0200 +++ b/Sources/Autogenerated/sdk_OrthancPluginImage.impl.h Thu Jun 27 15:52:51 2024 +0200 @@ -140,14 +140,14 @@ if (PyType_Ready(&sdk_OrthancPluginImage_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python class: OrthancPluginImage"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python class: OrthancPluginImage"); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } Py_INCREF(&sdk_OrthancPluginImage_Type); if (PyModule_AddObject(module, "Image", (PyObject *)&sdk_OrthancPluginImage_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python class: OrthancPluginImage"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python class: OrthancPluginImage"); Py_DECREF(&sdk_OrthancPluginImage_Type); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } diff -r b49eeb36cd0d -r c8de83fe7faa Sources/Autogenerated/sdk_OrthancPluginImageFormat.impl.h --- a/Sources/Autogenerated/sdk_OrthancPluginImageFormat.impl.h Thu Jun 27 14:26:59 2024 +0200 +++ b/Sources/Autogenerated/sdk_OrthancPluginImageFormat.impl.h Thu Jun 27 15:52:51 2024 +0200 @@ -47,7 +47,7 @@ if (PyType_Ready(&sdk_OrthancPluginImageFormat_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python enumeration: OrthancPluginImageFormat"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python enumeration: OrthancPluginImageFormat"); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } @@ -87,7 +87,7 @@ Py_INCREF(&sdk_OrthancPluginImageFormat_Type); if (PyModule_AddObject(module, "ImageFormat", (PyObject *)&sdk_OrthancPluginImageFormat_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python enumeration: OrthancPluginImageFormat"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python enumeration: OrthancPluginImageFormat"); Py_DECREF(&sdk_OrthancPluginImageFormat_Type); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } diff -r b49eeb36cd0d -r c8de83fe7faa Sources/Autogenerated/sdk_OrthancPluginInstanceOrigin.impl.h --- a/Sources/Autogenerated/sdk_OrthancPluginInstanceOrigin.impl.h Thu Jun 27 14:26:59 2024 +0200 +++ b/Sources/Autogenerated/sdk_OrthancPluginInstanceOrigin.impl.h Thu Jun 27 15:52:51 2024 +0200 @@ -47,7 +47,7 @@ if (PyType_Ready(&sdk_OrthancPluginInstanceOrigin_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python enumeration: OrthancPluginInstanceOrigin"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python enumeration: OrthancPluginInstanceOrigin"); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } @@ -105,7 +105,7 @@ Py_INCREF(&sdk_OrthancPluginInstanceOrigin_Type); if (PyModule_AddObject(module, "InstanceOrigin", (PyObject *)&sdk_OrthancPluginInstanceOrigin_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python enumeration: OrthancPluginInstanceOrigin"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python enumeration: OrthancPluginInstanceOrigin"); Py_DECREF(&sdk_OrthancPluginInstanceOrigin_Type); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } diff -r b49eeb36cd0d -r c8de83fe7faa Sources/Autogenerated/sdk_OrthancPluginJob.impl.h --- a/Sources/Autogenerated/sdk_OrthancPluginJob.impl.h Thu Jun 27 14:26:59 2024 +0200 +++ b/Sources/Autogenerated/sdk_OrthancPluginJob.impl.h Thu Jun 27 15:52:51 2024 +0200 @@ -110,14 +110,14 @@ if (PyType_Ready(&sdk_OrthancPluginJob_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python class: OrthancPluginJob"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python class: OrthancPluginJob"); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } Py_INCREF(&sdk_OrthancPluginJob_Type); if (PyModule_AddObject(module, "Job", (PyObject *)&sdk_OrthancPluginJob_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python class: OrthancPluginJob"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python class: OrthancPluginJob"); Py_DECREF(&sdk_OrthancPluginJob_Type); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } diff -r b49eeb36cd0d -r c8de83fe7faa Sources/Autogenerated/sdk_OrthancPluginJobStepStatus.impl.h --- a/Sources/Autogenerated/sdk_OrthancPluginJobStepStatus.impl.h Thu Jun 27 14:26:59 2024 +0200 +++ b/Sources/Autogenerated/sdk_OrthancPluginJobStepStatus.impl.h Thu Jun 27 15:52:51 2024 +0200 @@ -47,7 +47,7 @@ if (PyType_Ready(&sdk_OrthancPluginJobStepStatus_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python enumeration: OrthancPluginJobStepStatus"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python enumeration: OrthancPluginJobStepStatus"); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } @@ -87,7 +87,7 @@ Py_INCREF(&sdk_OrthancPluginJobStepStatus_Type); if (PyModule_AddObject(module, "JobStepStatus", (PyObject *)&sdk_OrthancPluginJobStepStatus_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python enumeration: OrthancPluginJobStepStatus"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python enumeration: OrthancPluginJobStepStatus"); Py_DECREF(&sdk_OrthancPluginJobStepStatus_Type); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } diff -r b49eeb36cd0d -r c8de83fe7faa Sources/Autogenerated/sdk_OrthancPluginJobStopReason.impl.h --- a/Sources/Autogenerated/sdk_OrthancPluginJobStopReason.impl.h Thu Jun 27 14:26:59 2024 +0200 +++ b/Sources/Autogenerated/sdk_OrthancPluginJobStopReason.impl.h Thu Jun 27 15:52:51 2024 +0200 @@ -47,7 +47,7 @@ if (PyType_Ready(&sdk_OrthancPluginJobStopReason_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python enumeration: OrthancPluginJobStopReason"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python enumeration: OrthancPluginJobStopReason"); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } @@ -93,7 +93,7 @@ Py_INCREF(&sdk_OrthancPluginJobStopReason_Type); if (PyModule_AddObject(module, "JobStopReason", (PyObject *)&sdk_OrthancPluginJobStopReason_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python enumeration: OrthancPluginJobStopReason"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python enumeration: OrthancPluginJobStopReason"); Py_DECREF(&sdk_OrthancPluginJobStopReason_Type); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } diff -r b49eeb36cd0d -r c8de83fe7faa Sources/Autogenerated/sdk_OrthancPluginMetricsType.impl.h --- a/Sources/Autogenerated/sdk_OrthancPluginMetricsType.impl.h Thu Jun 27 14:26:59 2024 +0200 +++ b/Sources/Autogenerated/sdk_OrthancPluginMetricsType.impl.h Thu Jun 27 15:52:51 2024 +0200 @@ -47,7 +47,7 @@ if (PyType_Ready(&sdk_OrthancPluginMetricsType_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python enumeration: OrthancPluginMetricsType"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python enumeration: OrthancPluginMetricsType"); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } @@ -81,7 +81,7 @@ Py_INCREF(&sdk_OrthancPluginMetricsType_Type); if (PyModule_AddObject(module, "MetricsType", (PyObject *)&sdk_OrthancPluginMetricsType_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python enumeration: OrthancPluginMetricsType"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python enumeration: OrthancPluginMetricsType"); Py_DECREF(&sdk_OrthancPluginMetricsType_Type); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } diff -r b49eeb36cd0d -r c8de83fe7faa Sources/Autogenerated/sdk_OrthancPluginPeers.impl.h --- a/Sources/Autogenerated/sdk_OrthancPluginPeers.impl.h Thu Jun 27 14:26:59 2024 +0200 +++ b/Sources/Autogenerated/sdk_OrthancPluginPeers.impl.h Thu Jun 27 15:52:51 2024 +0200 @@ -125,14 +125,14 @@ if (PyType_Ready(&sdk_OrthancPluginPeers_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python class: OrthancPluginPeers"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python class: OrthancPluginPeers"); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } Py_INCREF(&sdk_OrthancPluginPeers_Type); if (PyModule_AddObject(module, "Peers", (PyObject *)&sdk_OrthancPluginPeers_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python class: OrthancPluginPeers"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python class: OrthancPluginPeers"); Py_DECREF(&sdk_OrthancPluginPeers_Type); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } diff -r b49eeb36cd0d -r c8de83fe7faa Sources/Autogenerated/sdk_OrthancPluginPixelFormat.impl.h --- a/Sources/Autogenerated/sdk_OrthancPluginPixelFormat.impl.h Thu Jun 27 14:26:59 2024 +0200 +++ b/Sources/Autogenerated/sdk_OrthancPluginPixelFormat.impl.h Thu Jun 27 15:52:51 2024 +0200 @@ -47,7 +47,7 @@ if (PyType_Ready(&sdk_OrthancPluginPixelFormat_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python enumeration: OrthancPluginPixelFormat"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python enumeration: OrthancPluginPixelFormat"); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } @@ -135,7 +135,7 @@ Py_INCREF(&sdk_OrthancPluginPixelFormat_Type); if (PyModule_AddObject(module, "PixelFormat", (PyObject *)&sdk_OrthancPluginPixelFormat_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python enumeration: OrthancPluginPixelFormat"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python enumeration: OrthancPluginPixelFormat"); Py_DECREF(&sdk_OrthancPluginPixelFormat_Type); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } diff -r b49eeb36cd0d -r c8de83fe7faa Sources/Autogenerated/sdk_OrthancPluginReceivedInstanceAction.impl.h --- a/Sources/Autogenerated/sdk_OrthancPluginReceivedInstanceAction.impl.h Thu Jun 27 14:26:59 2024 +0200 +++ b/Sources/Autogenerated/sdk_OrthancPluginReceivedInstanceAction.impl.h Thu Jun 27 15:52:51 2024 +0200 @@ -47,7 +47,7 @@ if (PyType_Ready(&sdk_OrthancPluginReceivedInstanceAction_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python enumeration: OrthancPluginReceivedInstanceAction"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python enumeration: OrthancPluginReceivedInstanceAction"); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } @@ -87,7 +87,7 @@ Py_INCREF(&sdk_OrthancPluginReceivedInstanceAction_Type); if (PyModule_AddObject(module, "ReceivedInstanceAction", (PyObject *)&sdk_OrthancPluginReceivedInstanceAction_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python enumeration: OrthancPluginReceivedInstanceAction"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python enumeration: OrthancPluginReceivedInstanceAction"); Py_DECREF(&sdk_OrthancPluginReceivedInstanceAction_Type); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } diff -r b49eeb36cd0d -r c8de83fe7faa Sources/Autogenerated/sdk_OrthancPluginResourceType.impl.h --- a/Sources/Autogenerated/sdk_OrthancPluginResourceType.impl.h Thu Jun 27 14:26:59 2024 +0200 +++ b/Sources/Autogenerated/sdk_OrthancPluginResourceType.impl.h Thu Jun 27 15:52:51 2024 +0200 @@ -47,7 +47,7 @@ if (PyType_Ready(&sdk_OrthancPluginResourceType_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python enumeration: OrthancPluginResourceType"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python enumeration: OrthancPluginResourceType"); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } @@ -99,7 +99,7 @@ Py_INCREF(&sdk_OrthancPluginResourceType_Type); if (PyModule_AddObject(module, "ResourceType", (PyObject *)&sdk_OrthancPluginResourceType_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python enumeration: OrthancPluginResourceType"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python enumeration: OrthancPluginResourceType"); Py_DECREF(&sdk_OrthancPluginResourceType_Type); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } diff -r b49eeb36cd0d -r c8de83fe7faa Sources/Autogenerated/sdk_OrthancPluginRestOutput.impl.h --- a/Sources/Autogenerated/sdk_OrthancPluginRestOutput.impl.h Thu Jun 27 14:26:59 2024 +0200 +++ b/Sources/Autogenerated/sdk_OrthancPluginRestOutput.impl.h Thu Jun 27 15:52:51 2024 +0200 @@ -147,14 +147,14 @@ if (PyType_Ready(&sdk_OrthancPluginRestOutput_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python class: OrthancPluginRestOutput"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python class: OrthancPluginRestOutput"); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } Py_INCREF(&sdk_OrthancPluginRestOutput_Type); if (PyModule_AddObject(module, "RestOutput", (PyObject *)&sdk_OrthancPluginRestOutput_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python class: OrthancPluginRestOutput"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python class: OrthancPluginRestOutput"); Py_DECREF(&sdk_OrthancPluginRestOutput_Type); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } diff -r b49eeb36cd0d -r c8de83fe7faa Sources/Autogenerated/sdk_OrthancPluginServerChunkedRequestReader.impl.h --- a/Sources/Autogenerated/sdk_OrthancPluginServerChunkedRequestReader.impl.h Thu Jun 27 14:26:59 2024 +0200 +++ b/Sources/Autogenerated/sdk_OrthancPluginServerChunkedRequestReader.impl.h Thu Jun 27 15:52:51 2024 +0200 @@ -82,14 +82,14 @@ if (PyType_Ready(&sdk_OrthancPluginServerChunkedRequestReader_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python class: OrthancPluginServerChunkedRequestReader"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python class: OrthancPluginServerChunkedRequestReader"); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } Py_INCREF(&sdk_OrthancPluginServerChunkedRequestReader_Type); if (PyModule_AddObject(module, "ServerChunkedRequestReader", (PyObject *)&sdk_OrthancPluginServerChunkedRequestReader_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python class: OrthancPluginServerChunkedRequestReader"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python class: OrthancPluginServerChunkedRequestReader"); Py_DECREF(&sdk_OrthancPluginServerChunkedRequestReader_Type); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } diff -r b49eeb36cd0d -r c8de83fe7faa Sources/Autogenerated/sdk_OrthancPluginStorageArea.impl.h --- a/Sources/Autogenerated/sdk_OrthancPluginStorageArea.impl.h Thu Jun 27 14:26:59 2024 +0200 +++ b/Sources/Autogenerated/sdk_OrthancPluginStorageArea.impl.h Thu Jun 27 15:52:51 2024 +0200 @@ -102,14 +102,14 @@ if (PyType_Ready(&sdk_OrthancPluginStorageArea_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python class: OrthancPluginStorageArea"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python class: OrthancPluginStorageArea"); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } Py_INCREF(&sdk_OrthancPluginStorageArea_Type); if (PyModule_AddObject(module, "StorageArea", (PyObject *)&sdk_OrthancPluginStorageArea_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python class: OrthancPluginStorageArea"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python class: OrthancPluginStorageArea"); Py_DECREF(&sdk_OrthancPluginStorageArea_Type); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } diff -r b49eeb36cd0d -r c8de83fe7faa Sources/Autogenerated/sdk_OrthancPluginStorageCommitmentFailureReason.impl.h --- a/Sources/Autogenerated/sdk_OrthancPluginStorageCommitmentFailureReason.impl.h Thu Jun 27 14:26:59 2024 +0200 +++ b/Sources/Autogenerated/sdk_OrthancPluginStorageCommitmentFailureReason.impl.h Thu Jun 27 15:52:51 2024 +0200 @@ -47,7 +47,7 @@ if (PyType_Ready(&sdk_OrthancPluginStorageCommitmentFailureReason_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python enumeration: OrthancPluginStorageCommitmentFailureReason"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python enumeration: OrthancPluginStorageCommitmentFailureReason"); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } @@ -111,7 +111,7 @@ Py_INCREF(&sdk_OrthancPluginStorageCommitmentFailureReason_Type); if (PyModule_AddObject(module, "StorageCommitmentFailureReason", (PyObject *)&sdk_OrthancPluginStorageCommitmentFailureReason_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python enumeration: OrthancPluginStorageCommitmentFailureReason"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python enumeration: OrthancPluginStorageCommitmentFailureReason"); Py_DECREF(&sdk_OrthancPluginStorageCommitmentFailureReason_Type); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } diff -r b49eeb36cd0d -r c8de83fe7faa Sources/Autogenerated/sdk_OrthancPluginValueRepresentation.impl.h --- a/Sources/Autogenerated/sdk_OrthancPluginValueRepresentation.impl.h Thu Jun 27 14:26:59 2024 +0200 +++ b/Sources/Autogenerated/sdk_OrthancPluginValueRepresentation.impl.h Thu Jun 27 15:52:51 2024 +0200 @@ -47,7 +47,7 @@ if (PyType_Ready(&sdk_OrthancPluginValueRepresentation_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python enumeration: OrthancPluginValueRepresentation"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python enumeration: OrthancPluginValueRepresentation"); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } @@ -231,7 +231,7 @@ Py_INCREF(&sdk_OrthancPluginValueRepresentation_Type); if (PyModule_AddObject(module, "ValueRepresentation", (PyObject *)&sdk_OrthancPluginValueRepresentation_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python enumeration: OrthancPluginValueRepresentation"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python enumeration: OrthancPluginValueRepresentation"); Py_DECREF(&sdk_OrthancPluginValueRepresentation_Type); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } diff -r b49eeb36cd0d -r c8de83fe7faa Sources/Autogenerated/sdk_OrthancPluginWorklistAnswers.impl.h --- a/Sources/Autogenerated/sdk_OrthancPluginWorklistAnswers.impl.h Thu Jun 27 14:26:59 2024 +0200 +++ b/Sources/Autogenerated/sdk_OrthancPluginWorklistAnswers.impl.h Thu Jun 27 15:52:51 2024 +0200 @@ -92,14 +92,14 @@ if (PyType_Ready(&sdk_OrthancPluginWorklistAnswers_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python class: OrthancPluginWorklistAnswers"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python class: OrthancPluginWorklistAnswers"); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } Py_INCREF(&sdk_OrthancPluginWorklistAnswers_Type); if (PyModule_AddObject(module, "WorklistAnswers", (PyObject *)&sdk_OrthancPluginWorklistAnswers_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python class: OrthancPluginWorklistAnswers"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python class: OrthancPluginWorklistAnswers"); Py_DECREF(&sdk_OrthancPluginWorklistAnswers_Type); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } diff -r b49eeb36cd0d -r c8de83fe7faa Sources/Autogenerated/sdk_OrthancPluginWorklistQuery.impl.h --- a/Sources/Autogenerated/sdk_OrthancPluginWorklistQuery.impl.h Thu Jun 27 14:26:59 2024 +0200 +++ b/Sources/Autogenerated/sdk_OrthancPluginWorklistQuery.impl.h Thu Jun 27 15:52:51 2024 +0200 @@ -92,14 +92,14 @@ if (PyType_Ready(&sdk_OrthancPluginWorklistQuery_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python class: OrthancPluginWorklistQuery"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python class: OrthancPluginWorklistQuery"); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } Py_INCREF(&sdk_OrthancPluginWorklistQuery_Type); if (PyModule_AddObject(module, "WorklistQuery", (PyObject *)&sdk_OrthancPluginWorklistQuery_Type) < 0) { - OrthancPlugins::LogError("Cannot register Python class: OrthancPluginWorklistQuery"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python class: OrthancPluginWorklistQuery"); Py_DECREF(&sdk_OrthancPluginWorklistQuery_Type); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } diff -r b49eeb36cd0d -r c8de83fe7faa Sources/ICallbackRegistration.cpp --- a/Sources/ICallbackRegistration.cpp Thu Jun 27 14:26:59 2024 +0200 +++ b/Sources/ICallbackRegistration.cpp Thu Jun 27 15:52:51 2024 +0200 @@ -47,7 +47,7 @@ } else { - OrthancPlugins::LogInfo("Registering one " + details); + ORTHANC_PLUGINS_LOG_INFO("Registering one " + details); registration.Register(); singletonCallback = callback; @@ -84,7 +84,7 @@ } else { - OrthancPlugins::LogInfo("Registering callbacks " + details); + ORTHANC_PLUGINS_LOG_INFO("Registering callbacks " + details); registration.Register(); singletonCallback1 = callback1; @@ -127,7 +127,7 @@ } else { - OrthancPlugins::LogInfo("Registering callbacks " + details); + ORTHANC_PLUGINS_LOG_INFO("Registering callbacks " + details); registration.Register(); singletonCallback1 = callback1; diff -r b49eeb36cd0d -r c8de83fe7faa Sources/IncomingHttpRequestFilter.cpp --- a/Sources/IncomingHttpRequestFilter.cpp Thu Jun 27 14:26:59 2024 +0200 +++ b/Sources/IncomingHttpRequestFilter.cpp Thu Jun 27 15:52:51 2024 +0200 @@ -94,8 +94,7 @@ std::string traceback; if (lock.HasErrorOccurred(traceback)) { - OrthancPlugins::LogError("Error in the Python incoming-http-request filter, " - "traceback:\n" + traceback); + ORTHANC_PLUGINS_LOG_ERROR("Error in the Python incoming-http-request filter, traceback:\n" + traceback); return -1; } else @@ -106,15 +105,15 @@ } else { - OrthancPlugins::LogError("The Python incoming-http-request filter has not returned a Boolean"); + ORTHANC_PLUGINS_LOG_ERROR("The Python incoming-http-request filter has not returned a Boolean"); return -1; } } } catch (OrthancPlugins::PluginException& e) { - OrthancPlugins::LogError("Exception in the Python incoming-http-request filter: " + - std::string(e.What(OrthancPlugins::GetGlobalContext()))); + ORTHANC_PLUGINS_LOG_ERROR("Exception in the Python incoming-http-request filter: " + + std::string(e.What(OrthancPlugins::GetGlobalContext()))); return e.GetErrorCode(); } } diff -r b49eeb36cd0d -r c8de83fe7faa Sources/IncomingInstanceFilter.cpp --- a/Sources/IncomingInstanceFilter.cpp Thu Jun 27 14:26:59 2024 +0200 +++ b/Sources/IncomingInstanceFilter.cpp Thu Jun 27 15:52:51 2024 +0200 @@ -63,8 +63,7 @@ std::string traceback; if (lock.HasErrorOccurred(traceback)) { - OrthancPlugins::LogError("Error in the Python incoming-cstore-instance callback, " - "traceback:\n" + traceback); + ORTHANC_PLUGINS_LOG_ERROR("Error in the Python incoming-cstore-instance callback, traceback:\n" + traceback); return -1; } else @@ -75,7 +74,7 @@ if (code < 0) { - OrthancPlugins::LogError("The Python incoming-cstore-instance filter has returned a negative value"); + ORTHANC_PLUGINS_LOG_ERROR("The Python incoming-cstore-instance filter has returned a negative value"); return -1; } else if (code == 0) @@ -90,14 +89,14 @@ } else { - OrthancPlugins::LogError("The Python incoming-cstore-instance filter has returned an out-of-range DIMSE status: " + - boost::lexical_cast(code)); + ORTHANC_PLUGINS_LOG_ERROR("The Python incoming-cstore-instance filter has returned an out-of-range DIMSE status: " + + boost::lexical_cast(code)); return -1; } } else { - OrthancPlugins::LogError("The Python incoming-cstore-instance filter has not returned an integer"); + ORTHANC_PLUGINS_LOG_ERROR("The Python incoming-cstore-instance filter has not returned an integer"); return -1; } } diff -r b49eeb36cd0d -r c8de83fe7faa Sources/OnChangeCallback.cpp --- a/Sources/OnChangeCallback.cpp Thu Jun 27 14:26:59 2024 +0200 +++ b/Sources/OnChangeCallback.cpp Thu Jun 27 15:52:51 2024 +0200 @@ -193,14 +193,13 @@ std::string traceback; if (lock.HasErrorOccurred(traceback)) { - OrthancPlugins::LogError("Error in the Python on-change callback, " - "traceback:\n" + traceback); + ORTHANC_PLUGINS_LOG_ERROR("Error in the Python on-change callback, traceback:\n" + traceback); } } catch (OrthancPlugins::PluginException& e) { - OrthancPlugins::LogError("Error during Python on-change callback: " + - std::string(e.What(OrthancPlugins::GetGlobalContext()))); + ORTHANC_PLUGINS_LOG_ERROR("Error during Python on-change callback: " + + std::string(e.What(OrthancPlugins::GetGlobalContext()))); } } } diff -r b49eeb36cd0d -r c8de83fe7faa Sources/OnStoredInstanceCallback.cpp --- a/Sources/OnStoredInstanceCallback.cpp Thu Jun 27 14:26:59 2024 +0200 +++ b/Sources/OnStoredInstanceCallback.cpp Thu Jun 27 15:52:51 2024 +0200 @@ -61,8 +61,7 @@ std::string traceback; if (lock.HasErrorOccurred(traceback)) { - OrthancPlugins::LogError("Error in the Python on-stored-instance callback, " - "traceback:\n" + traceback); + ORTHANC_PLUGINS_LOG_ERROR("Error in the Python on-stored-instance callback, traceback:\n" + traceback); return OrthancPluginErrorCode_Plugin; } else diff -r b49eeb36cd0d -r c8de83fe7faa Sources/Plugin.cpp --- 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_) { diff -r b49eeb36cd0d -r c8de83fe7faa Sources/PythonBytes.cpp --- a/Sources/PythonBytes.cpp Thu Jun 27 14:26:59 2024 +0200 +++ b/Sources/PythonBytes.cpp Thu Jun 27 15:52:51 2024 +0200 @@ -28,7 +28,7 @@ { if (!bytes_->IsValid()) { - OrthancPlugins::LogError("Cannot create Python bytes"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot create Python bytes"); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } } diff -r b49eeb36cd0d -r c8de83fe7faa Sources/PythonFunction.cpp --- a/Sources/PythonFunction.cpp Thu Jun 27 14:26:59 2024 +0200 +++ b/Sources/PythonFunction.cpp Thu Jun 27 15:52:51 2024 +0200 @@ -55,8 +55,7 @@ !PyCallable_Check(func_->GetPyObject())) { func_.reset(); // Not such a function - OrthancPlugins::LogWarning("Missing Python function: " + module.GetName() + - "." + name + "()"); + ORTHANC_PLUGINS_LOG_WARNING("Missing Python function: " + module.GetName() + "." + name + "()"); } } } @@ -69,7 +68,7 @@ std::string error; if (lock_.HasErrorOccurred(error)) { - OrthancPlugins::LogError("Python exception has occurred, traceback:\n" + error); + ORTHANC_PLUGINS_LOG_ERROR("Python exception has occurred, traceback:\n" + error); ORTHANC_PLUGINS_THROW_EXCEPTION(Plugin); } else @@ -86,7 +85,7 @@ std::string error; if (lock_.HasErrorOccurred(error)) { - OrthancPlugins::LogError("Python exception has occurred, traceback:\n" + error); + ORTHANC_PLUGINS_LOG_ERROR("Python exception has occurred, traceback:\n" + error); ORTHANC_PLUGINS_THROW_EXCEPTION(Plugin); } else diff -r b49eeb36cd0d -r c8de83fe7faa Sources/PythonLock.cpp --- a/Sources/PythonLock.cpp Thu Jun 27 14:26:59 2024 +0200 +++ b/Sources/PythonLock.cpp Thu Jun 27 15:52:51 2024 +0200 @@ -56,14 +56,14 @@ PythonLock::PythonLock() : gstate_(PyGILState_Ensure()) { - //OrthancPlugins::LogInfo("Python lock (GIL) acquired"); + //ORTHANC_PLUGINS_LOG_INFO("Python lock (GIL) acquired"); } PythonLock::~PythonLock() { PyGILState_Release(gstate_); - //OrthancPlugins::LogInfo("Python lock (GIL) released"); + //ORTHANC_PLUGINS_LOG_INFO("Python lock (GIL) released"); } @@ -71,7 +71,7 @@ { if (PyRun_SimpleString(s.c_str()) != 0) { - OrthancPlugins::LogError("Error while executing a Python command"); + ORTHANC_PLUGINS_LOG_ERROR("Error while executing a Python command"); ORTHANC_PLUGINS_THROW_EXCEPTION(Plugin); } } @@ -191,7 +191,7 @@ if (state->exceptionObject_ == NULL) { Py_DECREF(module); - OrthancPlugins::LogError("Cannot create the Python exception class"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot create the Python exception class"); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } @@ -200,7 +200,7 @@ { Py_XDECREF(state->exceptionObject_); Py_CLEAR(state->exceptionObject_); - OrthancPlugins::LogError("Cannot create the Python exception class"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot create the Python exception class"); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } } @@ -251,7 +251,7 @@ PyObject *module = PyModule_Create(&moduledef); if (module == NULL) { - OrthancPlugins::LogError("Cannot create a Python module"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot create a Python module"); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } @@ -276,7 +276,7 @@ PyObject *module = Py_InitModule(moduleName_.c_str(), moduleFunctions_()); if (module == NULL) { - OrthancPlugins::LogError("Cannot create a Python module"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot create a Python module"); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } @@ -294,7 +294,7 @@ if (HasErrorOccurred(traceback)) { - OrthancPlugins::LogError("Error in the " + callbackDetails + ", traceback:\n" + traceback); + ORTHANC_PLUGINS_LOG_ERROR("Error in the " + callbackDetails + ", traceback:\n" + traceback); return OrthancPluginErrorCode_Plugin; } else @@ -315,7 +315,7 @@ if (interpreterState_ != NULL) { - OrthancPlugins::LogError("Cannot initialize twice the Python interpreter"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot initialize twice the Python interpreter"); ORTHANC_PLUGINS_THROW_EXCEPTION(BadSequenceOfCalls); } @@ -333,8 +333,7 @@ if (exceptionName.find('.') != std::string::npos) { - OrthancPlugins::LogError("The name of the exception cannot contain \".\", found: " + - exceptionName); + ORTHANC_PLUGINS_LOG_ERROR("The name of the exception cannot contain \".\", found: " + exceptionName); ORTHANC_PLUGINS_THROW_EXCEPTION(ParameterOutOfRange); } @@ -351,7 +350,7 @@ str.ToString(executable); } - OrthancPlugins::LogWarning("Program name: " + executable); + ORTHANC_PLUGINS_LOG_WARNING("Program name: " + executable); #if PY_MAJOR_VERSION == 2 Py_SetProgramName(&executable[0]); /* optional but recommended */ @@ -440,7 +439,7 @@ PyObject *sysPath = PySys_GetObject(const_cast("path")); if (sysPath == NULL) { - OrthancPlugins::LogError("Cannot find sys.path"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot find sys.path"); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } @@ -449,7 +448,7 @@ if (result != 0) { - OrthancPlugins::LogError("Cannot run sys.path.append()"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot run sys.path.append()"); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } } @@ -494,7 +493,7 @@ struct module_state *state = GETSTATE(module.GetPyObject()); if (state->exceptionObject_ == NULL) { - OrthancPlugins::LogError("No Python exception has been registered"); + ORTHANC_PLUGINS_LOG_ERROR("No Python exception has been registered"); } else { @@ -520,6 +519,6 @@ if (verbose_) { - OrthancPlugins::LogInfo(message); + ORTHANC_PLUGINS_LOG_INFO(message); } } diff -r b49eeb36cd0d -r c8de83fe7faa Sources/PythonObject.cpp --- a/Sources/PythonObject.cpp Thu Jun 27 14:26:59 2024 +0200 +++ b/Sources/PythonObject.cpp Thu Jun 27 15:52:51 2024 +0200 @@ -130,7 +130,7 @@ } else { - OrthancPlugins::LogError("Cannot release a NULL or borrowed reference"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot release a NULL or borrowed reference"); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } } diff -r b49eeb36cd0d -r c8de83fe7faa Sources/PythonString.cpp --- a/Sources/PythonString.cpp Thu Jun 27 14:26:59 2024 +0200 +++ b/Sources/PythonString.cpp Thu Jun 27 15:52:51 2024 +0200 @@ -28,7 +28,7 @@ { if (!string_->IsValid()) { - OrthancPlugins::LogError("Cannot create a Python string, check that the string is properly encoded using UTF-8"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot create a Python string, check that the string is properly encoded using UTF-8"); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } } diff -r b49eeb36cd0d -r c8de83fe7faa Sources/ReceivedInstanceCallback.cpp --- a/Sources/ReceivedInstanceCallback.cpp Thu Jun 27 14:26:59 2024 +0200 +++ b/Sources/ReceivedInstanceCallback.cpp Thu Jun 27 15:52:51 2024 +0200 @@ -53,12 +53,12 @@ std::string traceback; if (lock.HasErrorOccurred(traceback)) { - OrthancPlugins::LogError("Error in the Python received instance callback, traceback:\n" + traceback); + ORTHANC_PLUGINS_LOG_ERROR("Error in the Python received instance callback, traceback:\n" + traceback); return OrthancPluginReceivedInstanceAction_KeepAsIs; } else if (!PyTuple_Check(result.GetPyObject()) || PyTuple_Size(result.GetPyObject()) != 2) { - OrthancPlugins::LogError("The Python received instance callback has not returned a tuple as expected"); + ORTHANC_PLUGINS_LOG_ERROR("The Python received instance callback has not returned a tuple as expected"); return OrthancPluginReceivedInstanceAction_KeepAsIs; } else @@ -68,7 +68,7 @@ if (!PyLong_Check(returnCode)) { - OrthancPlugins::LogError("The Python received instance callback has not returned an int as the first element of the return tuple"); + ORTHANC_PLUGINS_LOG_ERROR("The Python received instance callback has not returned an int as the first element of the return tuple"); return OrthancPluginReceivedInstanceAction_KeepAsIs; } @@ -85,7 +85,7 @@ Py_ssize_t pythonSize = 0; if (PyBytes_AsStringAndSize(modifiedDicom, &pythonBuffer, &pythonSize) == 1) { - OrthancPlugins::LogError("Cannot access the byte buffer returned by the Python received instance callback"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot access the byte buffer returned by the Python received instance callback"); return OrthancPluginReceivedInstanceAction_KeepAsIs; } else @@ -96,7 +96,7 @@ { if (modifiedDicomBuffer->data == NULL) { - OrthancPlugins::LogError("Cannot allocate memory in the Python received instance callback"); + ORTHANC_PLUGINS_LOG_ERROR("Cannot allocate memory in the Python received instance callback"); return OrthancPluginReceivedInstanceAction_KeepAsIs; } else @@ -112,8 +112,8 @@ } catch (OrthancPlugins::PluginException& e) { - OrthancPlugins::LogError("Error in the Python received instance callback: " + - std::string(e.What(OrthancPlugins::GetGlobalContext()))); + ORTHANC_PLUGINS_LOG_ERROR("Error in the Python received instance callback: " + + std::string(e.What(OrthancPlugins::GetGlobalContext()))); } return OrthancPluginReceivedInstanceAction_KeepAsIs; diff -r b49eeb36cd0d -r c8de83fe7faa Sources/RestCallbacks.cpp --- a/Sources/RestCallbacks.cpp Thu Jun 27 14:26:59 2024 +0200 +++ b/Sources/RestCallbacks.cpp Thu Jun 27 15:52:51 2024 +0200 @@ -185,7 +185,7 @@ std::string traceback; if (lock.HasErrorOccurred(traceback)) { - OrthancPlugins::LogError("Error in the REST callback, traceback:\n" + traceback); + ORTHANC_PLUGINS_LOG_ERROR("Error in the REST callback, traceback:\n" + traceback); ORTHANC_PLUGINS_THROW_EXCEPTION(Plugin); } @@ -194,7 +194,7 @@ } // Should never happen - OrthancPlugins::LogError("Unable to find the Python handler for URI: " + std::string(uri)); + ORTHANC_PLUGINS_LOG_ERROR("Unable to find the Python handler for URI: " + std::string(uri)); ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError); } @@ -216,7 +216,7 @@ return NULL; } - OrthancPlugins::LogInfo("Registering a Python REST callback on URI: " + std::string(uri)); + ORTHANC_PLUGINS_LOG_INFO("Registering a Python REST callback on URI: " + std::string(uri)); OrthancPlugins::RegisterRestCallback(uri, true /* thread safe */); restCallbacks_.push_back(new RestCallback(uri, callback)); diff -r b49eeb36cd0d -r c8de83fe7faa Sources/StorageArea.cpp --- 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); diff -r b49eeb36cd0d -r c8de83fe7faa Sources/StorageCommitmentScpCallback.cpp --- a/Sources/StorageCommitmentScpCallback.cpp Thu Jun 27 14:26:59 2024 +0200 +++ b/Sources/StorageCommitmentScpCallback.cpp Thu Jun 27 15:52:51 2024 +0200 @@ -84,15 +84,14 @@ std::string traceback; if (lock.HasErrorOccurred(traceback)) { - OrthancPlugins::LogError("Error in the Python storage commitment SCP callback, " - "traceback:\n" + traceback); + ORTHANC_PLUGINS_LOG_ERROR("Error in the Python storage commitment SCP callback, traceback:\n" + traceback); return OrthancPluginErrorCode_Plugin; } } catch (OrthancPlugins::PluginException& e) { - OrthancPlugins::LogError("Error in the Python storage commitment SCP callback: " + - std::string(e.What(OrthancPlugins::GetGlobalContext()))); + ORTHANC_PLUGINS_LOG_ERROR("Error in the Python storage commitment SCP callback: " + + std::string(e.What(OrthancPlugins::GetGlobalContext()))); } return OrthancPluginErrorCode_Success; } @@ -126,7 +125,7 @@ if (!PyLong_Check(result.GetPyObject())) { - OrthancPlugins::LogError("The Python storage commitment Lookup callback has not returned an int as the return value"); + ORTHANC_PLUGINS_LOG_ERROR("The Python storage commitment Lookup callback has not returned an int as the return value"); return OrthancPluginErrorCode_Plugin; } @@ -135,15 +134,14 @@ std::string traceback; if (lock.HasErrorOccurred(traceback)) { - OrthancPlugins::LogError("Error in the Python storage commitment Lookup callback, " - "traceback:\n" + traceback); + ORTHANC_PLUGINS_LOG_ERROR("Error in the Python storage commitment Lookup callback, traceback:\n" + traceback); return OrthancPluginErrorCode_Plugin; } } catch (OrthancPlugins::PluginException& e) { - OrthancPlugins::LogError("Error in the Python storage commitment Lookup callback: " + - std::string(e.What(OrthancPlugins::GetGlobalContext()))); + ORTHANC_PLUGINS_LOG_ERROR("Error in the Python storage commitment Lookup callback: " + + std::string(e.What(OrthancPlugins::GetGlobalContext()))); } return OrthancPluginErrorCode_Success; } @@ -184,4 +182,4 @@ { ICallbackRegistration::Unregister(storageCommitmentScpCallback_); ICallbackRegistration::Unregister(storageCommitmentLookupCallback_); -} \ No newline at end of file +}