Mercurial > hg > orthanc-python
changeset 28:b2bbb516056e
The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
line wrap: on
line diff
--- a/CodeAnalysis/Class.mustache Tue Apr 07 07:52:07 2020 +0200 +++ b/CodeAnalysis/Class.mustache Mon Apr 27 07:59:35 2020 +0200 @@ -48,7 +48,7 @@ static int sdk_{{class_name}}_Constructor( sdk_{{class_name}}_Object *self, PyObject *args, PyObject *kwds) { - OrthancPlugins::LogInfo("Creating Python object of class {{class_name}}"); + PythonLock::LogCall("Creating Python object of class {{class_name}}"); self->object_ = NULL; self->borrowed_ = false; @@ -85,7 +85,7 @@ {{#destructor}} static void sdk_{{class_name}}_Destructor(PyObject *self) { - OrthancPlugins::LogInfo("Destroying Python object of class {{class_name}}"); + PythonLock::LogCall("Destroying Python object of class {{class_name}}"); sdk_{{class_name}}_Object& tmp = *((sdk_{{class_name}}_Object*) self); @@ -106,7 +106,7 @@ static PyObject *sdk_{{class_name}}_{{c_function}}( sdk_{{class_name}}_Object* self, PyObject *args) { - OrthancPlugins::LogInfo("Calling method {{c_function}}() on object of class {{class_name}}"); + PythonLock::LogCall("Calling method {{c_function}}() on object of class {{class_name}}"); if (self->object_ == NULL) {
--- a/CodeAnalysis/GlobalFunctions.mustache Tue Apr 07 07:52:07 2020 +0200 +++ b/CodeAnalysis/GlobalFunctions.mustache Mon Apr 27 07:59:35 2020 +0200 @@ -20,7 +20,7 @@ {{#global_functions}} static PyObject* sdk_{{c_function}}(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: {{c_function}}()"); + PythonLock::LogCall("Calling Python global function: {{c_function}}()"); {{> function_body}} }
--- a/CodeAnalysis/ParseOrthancSDK.py Tue Apr 07 07:52:07 2020 +0200 +++ b/CodeAnalysis/ParseOrthancSDK.py Mon Apr 27 07:59:35 2020 +0200 @@ -19,11 +19,6 @@ ## -# Ubuntu 18.04: -# sudo apt-get install python-clang-4.0 -# python2 ./ParseOrthancSDK.py --libclang=libclang-4.0.so.1 ../Resources/Orthanc/Sdk-1.5.7/orthanc/OrthancCPlugin.h ../Sources/Autogenerated - - import argparse import clang.cindex import os
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CodeAnalysis/README.txt Mon Apr 27 07:59:35 2020 +0200 @@ -0,0 +1,17 @@ + +Introduction +============ + +This folder contains the Python script that analyzes the header of the +Orthanc Plugin SDK using clang, then automatically wraps this SDK as a +Python extension module. The output of the script is written to +"../Sources/Autogenerated". + + +Usage on Ubuntu 18.04 +===================== + +$ sudo apt-get install python-clang-4.0 +$ python2 ./ParseOrthancSDK.py --libclang=libclang-4.0.so.1 \ + --source ../Resources/Orthanc/Sdk-1.5.7/orthanc/OrthancCPlugin.h \ + --target ../Sources/Autogenerated
--- a/CodeAnalysis/sdk.cpp.mustache Tue Apr 07 07:52:07 2020 +0200 +++ b/CodeAnalysis/sdk.cpp.mustache Mon Apr 27 07:59:35 2020 +0200 @@ -19,6 +19,8 @@ #include "sdk.h" +#include "../PythonLock.h" + #include <OrthancPluginCppWrapper.h> {{#enumerations}}
--- a/NEWS Tue Apr 07 07:52:07 2020 +0200 +++ b/NEWS Mon Apr 27 07:59:35 2020 +0200 @@ -2,6 +2,7 @@ =============================== * Fix compilation using Visual Studio +* The "Calling Python..." info logs are disabled if "PythonVerbose" is "false" Version 1.0 (2020-04-01)
--- a/Sources/Autogenerated/sdk.cpp Tue Apr 07 07:52:07 2020 +0200 +++ b/Sources/Autogenerated/sdk.cpp Mon Apr 27 07:59:35 2020 +0200 @@ -19,6 +19,8 @@ #include "sdk.h" +#include "../PythonLock.h" + #include <OrthancPluginCppWrapper.h> #include "./sdk_OrthancPluginInstanceOrigin.impl.h"
--- a/Sources/Autogenerated/sdk_GlobalFunctions.impl.h Tue Apr 07 07:52:07 2020 +0200 +++ b/Sources/Autogenerated/sdk_GlobalFunctions.impl.h Mon Apr 27 07:59:35 2020 +0200 @@ -19,7 +19,7 @@ static PyObject* sdk_OrthancPluginCheckVersionAdvanced(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginCheckVersionAdvanced()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginCheckVersionAdvanced()"); int arg0 = 0; int arg1 = 0; @@ -38,7 +38,7 @@ static PyObject* sdk_OrthancPluginCheckVersion(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginCheckVersion()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginCheckVersion()"); long value = OrthancPluginCheckVersion(OrthancPlugins::GetGlobalContext()); @@ -48,7 +48,7 @@ static PyObject* sdk_OrthancPluginLogError(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginLogError()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginLogError()"); const char* arg0 = NULL; @@ -67,7 +67,7 @@ static PyObject* sdk_OrthancPluginLogWarning(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginLogWarning()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginLogWarning()"); const char* arg0 = NULL; @@ -86,7 +86,7 @@ static PyObject* sdk_OrthancPluginLogInfo(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginLogInfo()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginLogInfo()"); const char* arg0 = NULL; @@ -105,7 +105,7 @@ static PyObject* sdk_OrthancPluginGetDicomForInstance(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginGetDicomForInstance()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginGetDicomForInstance()"); const char* arg0 = NULL; @@ -133,7 +133,7 @@ static PyObject* sdk_OrthancPluginRestApiGet(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginRestApiGet()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginRestApiGet()"); const char* arg0 = NULL; @@ -161,7 +161,7 @@ static PyObject* sdk_OrthancPluginRestApiGetAfterPlugins(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginRestApiGetAfterPlugins()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginRestApiGetAfterPlugins()"); const char* arg0 = NULL; @@ -189,7 +189,7 @@ static PyObject* sdk_OrthancPluginRestApiPost(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginRestApiPost()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginRestApiPost()"); const char* arg0 = NULL; Py_buffer arg1; @@ -218,7 +218,7 @@ static PyObject* sdk_OrthancPluginRestApiPostAfterPlugins(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginRestApiPostAfterPlugins()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginRestApiPostAfterPlugins()"); const char* arg0 = NULL; Py_buffer arg1; @@ -247,7 +247,7 @@ static PyObject* sdk_OrthancPluginRestApiDelete(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginRestApiDelete()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginRestApiDelete()"); const char* arg0 = NULL; @@ -276,7 +276,7 @@ static PyObject* sdk_OrthancPluginRestApiDeleteAfterPlugins(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginRestApiDeleteAfterPlugins()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginRestApiDeleteAfterPlugins()"); const char* arg0 = NULL; @@ -305,7 +305,7 @@ static PyObject* sdk_OrthancPluginRestApiPut(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginRestApiPut()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginRestApiPut()"); const char* arg0 = NULL; Py_buffer arg1; @@ -334,7 +334,7 @@ static PyObject* sdk_OrthancPluginRestApiPutAfterPlugins(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginRestApiPutAfterPlugins()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginRestApiPutAfterPlugins()"); const char* arg0 = NULL; Py_buffer arg1; @@ -363,7 +363,7 @@ static PyObject* sdk_OrthancPluginLookupPatient(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginLookupPatient()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginLookupPatient()"); const char* arg0 = NULL; @@ -391,7 +391,7 @@ static PyObject* sdk_OrthancPluginLookupStudy(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginLookupStudy()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginLookupStudy()"); const char* arg0 = NULL; @@ -419,7 +419,7 @@ static PyObject* sdk_OrthancPluginLookupStudyWithAccessionNumber(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginLookupStudyWithAccessionNumber()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginLookupStudyWithAccessionNumber()"); const char* arg0 = NULL; @@ -447,7 +447,7 @@ static PyObject* sdk_OrthancPluginLookupSeries(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginLookupSeries()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginLookupSeries()"); const char* arg0 = NULL; @@ -475,7 +475,7 @@ static PyObject* sdk_OrthancPluginLookupInstance(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginLookupInstance()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginLookupInstance()"); const char* arg0 = NULL; @@ -503,7 +503,7 @@ static PyObject* sdk_OrthancPluginGetOrthancPath(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginGetOrthancPath()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginGetOrthancPath()"); OrthancPlugins::OrthancString s; @@ -524,7 +524,7 @@ static PyObject* sdk_OrthancPluginGetOrthancDirectory(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginGetOrthancDirectory()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginGetOrthancDirectory()"); OrthancPlugins::OrthancString s; @@ -545,7 +545,7 @@ static PyObject* sdk_OrthancPluginGetConfigurationPath(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginGetConfigurationPath()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginGetConfigurationPath()"); OrthancPlugins::OrthancString s; @@ -566,7 +566,7 @@ static PyObject* sdk_OrthancPluginSetRootUri(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginSetRootUri()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginSetRootUri()"); const char* arg0 = NULL; @@ -585,7 +585,7 @@ static PyObject* sdk_OrthancPluginSetDescription(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginSetDescription()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginSetDescription()"); const char* arg0 = NULL; @@ -604,7 +604,7 @@ static PyObject* sdk_OrthancPluginExtendOrthancExplorer(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginExtendOrthancExplorer()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginExtendOrthancExplorer()"); const char* arg0 = NULL; @@ -623,7 +623,7 @@ static PyObject* sdk_OrthancPluginGetGlobalProperty(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginGetGlobalProperty()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginGetGlobalProperty()"); long int arg0 = 0; const char* arg1 = NULL; @@ -652,7 +652,7 @@ static PyObject* sdk_OrthancPluginSetGlobalProperty(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginSetGlobalProperty()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginSetGlobalProperty()"); long int arg0 = 0; const char* arg1 = NULL; @@ -682,7 +682,7 @@ static PyObject* sdk_OrthancPluginGetCommandLineArgumentsCount(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginGetCommandLineArgumentsCount()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginGetCommandLineArgumentsCount()"); long value = OrthancPluginGetCommandLineArgumentsCount(OrthancPlugins::GetGlobalContext()); @@ -692,7 +692,7 @@ static PyObject* sdk_OrthancPluginGetCommandLineArgument(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginGetCommandLineArgument()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginGetCommandLineArgument()"); unsigned long arg0 = 0; @@ -720,7 +720,7 @@ static PyObject* sdk_OrthancPluginGetExpectedDatabaseVersion(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginGetExpectedDatabaseVersion()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginGetExpectedDatabaseVersion()"); long value = OrthancPluginGetExpectedDatabaseVersion(OrthancPlugins::GetGlobalContext()); @@ -730,7 +730,7 @@ static PyObject* sdk_OrthancPluginGetConfiguration(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginGetConfiguration()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginGetConfiguration()"); OrthancPlugins::OrthancString s; @@ -751,7 +751,7 @@ static PyObject* sdk_OrthancPluginBufferCompression(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginBufferCompression()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginBufferCompression()"); Py_buffer arg0; long int arg2 = 0; @@ -781,7 +781,7 @@ static PyObject* sdk_OrthancPluginReadFile(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginReadFile()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginReadFile()"); const char* arg0 = NULL; @@ -809,7 +809,7 @@ static PyObject* sdk_OrthancPluginWriteFile(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginWriteFile()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginWriteFile()"); const char* arg0 = NULL; Py_buffer arg1; @@ -839,7 +839,7 @@ static PyObject* sdk_OrthancPluginGetErrorDescription(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginGetErrorDescription()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginGetErrorDescription()"); long int arg0 = 0; @@ -864,7 +864,7 @@ static PyObject* sdk_OrthancPluginUncompressImage(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginUncompressImage()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginUncompressImage()"); Py_buffer arg0; long int arg2 = 0; @@ -896,7 +896,7 @@ static PyObject* sdk_OrthancPluginCompressPngImage(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginCompressPngImage()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginCompressPngImage()"); long int arg0 = 0; unsigned long arg1 = 0; @@ -928,7 +928,7 @@ static PyObject* sdk_OrthancPluginCompressJpegImage(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginCompressJpegImage()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginCompressJpegImage()"); long int arg0 = 0; unsigned long arg1 = 0; @@ -961,7 +961,7 @@ static PyObject* sdk_OrthancPluginHttpGet(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginHttpGet()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginHttpGet()"); const char* arg0 = NULL; const char* arg1 = NULL; @@ -991,7 +991,7 @@ static PyObject* sdk_OrthancPluginHttpPost(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginHttpPost()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginHttpPost()"); const char* arg0 = NULL; Py_buffer arg1; @@ -1022,7 +1022,7 @@ static PyObject* sdk_OrthancPluginHttpPut(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginHttpPut()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginHttpPut()"); const char* arg0 = NULL; Py_buffer arg1; @@ -1053,7 +1053,7 @@ static PyObject* sdk_OrthancPluginHttpDelete(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginHttpDelete()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginHttpDelete()"); const char* arg0 = NULL; const char* arg1 = NULL; @@ -1084,7 +1084,7 @@ static PyObject* sdk_OrthancPluginGetFontsCount(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginGetFontsCount()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginGetFontsCount()"); long value = OrthancPluginGetFontsCount(OrthancPlugins::GetGlobalContext()); @@ -1094,7 +1094,7 @@ static PyObject* sdk_OrthancPluginGetFontName(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginGetFontName()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginGetFontName()"); unsigned long arg0 = 0; @@ -1119,7 +1119,7 @@ static PyObject* sdk_OrthancPluginGetFontSize(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginGetFontSize()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginGetFontSize()"); unsigned long arg0 = 0; @@ -1136,7 +1136,7 @@ static PyObject* sdk_OrthancPluginRegisterErrorCode(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginRegisterErrorCode()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginRegisterErrorCode()"); long int arg0 = 0; unsigned short arg1 = 0; @@ -1167,7 +1167,7 @@ static PyObject* sdk_OrthancPluginRegisterDictionaryTag(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginRegisterDictionaryTag()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginRegisterDictionaryTag()"); unsigned short arg0 = 0; unsigned short arg1 = 0; @@ -1201,7 +1201,7 @@ static PyObject* sdk_OrthancPluginRegisterPrivateDictionaryTag(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginRegisterPrivateDictionaryTag()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginRegisterPrivateDictionaryTag()"); unsigned short arg0 = 0; unsigned short arg1 = 0; @@ -1236,7 +1236,7 @@ static PyObject* sdk_OrthancPluginDicomBufferToJson(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginDicomBufferToJson()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginDicomBufferToJson()"); Py_buffer arg0; long int arg2 = 0; @@ -1267,7 +1267,7 @@ static PyObject* sdk_OrthancPluginDicomInstanceToJson(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginDicomInstanceToJson()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginDicomInstanceToJson()"); const char* arg0 = NULL; long int arg1 = 0; @@ -1298,7 +1298,7 @@ static PyObject* sdk_OrthancPluginCreateImage(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginCreateImage()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginCreateImage()"); long int arg0 = 0; unsigned long arg1 = 0; @@ -1331,7 +1331,7 @@ static PyObject* sdk_OrthancPluginDecodeDicomImage(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginDecodeDicomImage()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginDecodeDicomImage()"); Py_buffer arg0; unsigned long arg2 = 0; @@ -1363,7 +1363,7 @@ static PyObject* sdk_OrthancPluginComputeMd5(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginComputeMd5()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginComputeMd5()"); Py_buffer arg0; @@ -1391,7 +1391,7 @@ static PyObject* sdk_OrthancPluginComputeSha1(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginComputeSha1()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginComputeSha1()"); Py_buffer arg0; @@ -1419,7 +1419,7 @@ static PyObject* sdk_OrthancPluginGenerateUuid(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginGenerateUuid()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginGenerateUuid()"); OrthancPlugins::OrthancString s; @@ -1440,7 +1440,7 @@ static PyObject* sdk_OrthancPluginGetPeers(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginGetPeers()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginGetPeers()"); // This is the case of a constructor @@ -1464,7 +1464,7 @@ static PyObject* sdk_OrthancPluginAutodetectMimeType(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginAutodetectMimeType()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginAutodetectMimeType()"); const char* arg0 = NULL; @@ -1489,7 +1489,7 @@ static PyObject* sdk_OrthancPluginSetMetricsValue(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginSetMetricsValue()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginSetMetricsValue()"); const char* arg0 = NULL; float arg1 = 0; @@ -1510,7 +1510,7 @@ static PyObject* sdk_OrthancPluginGetTagName(PyObject* module, PyObject* args) { - OrthancPlugins::LogInfo("Calling Python global function: OrthancPluginGetTagName()"); + PythonLock::LogCall("Calling Python global function: OrthancPluginGetTagName()"); unsigned short arg0 = 0; unsigned short arg1 = 0;
--- a/Sources/Autogenerated/sdk_OrthancPluginDicomInstance.impl.h Tue Apr 07 07:52:07 2020 +0200 +++ b/Sources/Autogenerated/sdk_OrthancPluginDicomInstance.impl.h Mon Apr 27 07:59:35 2020 +0200 @@ -74,7 +74,7 @@ static int sdk_OrthancPluginDicomInstance_Constructor( sdk_OrthancPluginDicomInstance_Object *self, PyObject *args, PyObject *kwds) { - OrthancPlugins::LogInfo("Creating Python object of class OrthancPluginDicomInstance"); + PythonLock::LogCall("Creating Python object of class OrthancPluginDicomInstance"); self->object_ = NULL; self->borrowed_ = false; @@ -114,7 +114,7 @@ static PyObject *sdk_OrthancPluginDicomInstance_OrthancPluginGetInstanceRemoteAet( sdk_OrthancPluginDicomInstance_Object* self, PyObject *args) { - OrthancPlugins::LogInfo("Calling method OrthancPluginGetInstanceRemoteAet() on object of class OrthancPluginDicomInstance"); + PythonLock::LogCall("Calling method OrthancPluginGetInstanceRemoteAet() on object of class OrthancPluginDicomInstance"); if (self->object_ == NULL) { @@ -141,7 +141,7 @@ static PyObject *sdk_OrthancPluginDicomInstance_OrthancPluginGetInstanceSize( sdk_OrthancPluginDicomInstance_Object* self, PyObject *args) { - OrthancPlugins::LogInfo("Calling method OrthancPluginGetInstanceSize() on object of class OrthancPluginDicomInstance"); + PythonLock::LogCall("Calling method OrthancPluginGetInstanceSize() on object of class OrthancPluginDicomInstance"); if (self->object_ == NULL) { @@ -160,7 +160,7 @@ static PyObject *sdk_OrthancPluginDicomInstance_OrthancPluginGetInstanceJson( sdk_OrthancPluginDicomInstance_Object* self, PyObject *args) { - OrthancPlugins::LogInfo("Calling method OrthancPluginGetInstanceJson() on object of class OrthancPluginDicomInstance"); + PythonLock::LogCall("Calling method OrthancPluginGetInstanceJson() on object of class OrthancPluginDicomInstance"); if (self->object_ == NULL) { @@ -190,7 +190,7 @@ static PyObject *sdk_OrthancPluginDicomInstance_OrthancPluginGetInstanceSimplifiedJson( sdk_OrthancPluginDicomInstance_Object* self, PyObject *args) { - OrthancPlugins::LogInfo("Calling method OrthancPluginGetInstanceSimplifiedJson() on object of class OrthancPluginDicomInstance"); + PythonLock::LogCall("Calling method OrthancPluginGetInstanceSimplifiedJson() on object of class OrthancPluginDicomInstance"); if (self->object_ == NULL) { @@ -220,7 +220,7 @@ static PyObject *sdk_OrthancPluginDicomInstance_OrthancPluginHasInstanceMetadata( sdk_OrthancPluginDicomInstance_Object* self, PyObject *args) { - OrthancPlugins::LogInfo("Calling method OrthancPluginHasInstanceMetadata() on object of class OrthancPluginDicomInstance"); + PythonLock::LogCall("Calling method OrthancPluginHasInstanceMetadata() on object of class OrthancPluginDicomInstance"); if (self->object_ == NULL) { @@ -246,7 +246,7 @@ static PyObject *sdk_OrthancPluginDicomInstance_OrthancPluginGetInstanceMetadata( sdk_OrthancPluginDicomInstance_Object* self, PyObject *args) { - OrthancPlugins::LogInfo("Calling method OrthancPluginGetInstanceMetadata() on object of class OrthancPluginDicomInstance"); + PythonLock::LogCall("Calling method OrthancPluginGetInstanceMetadata() on object of class OrthancPluginDicomInstance"); if (self->object_ == NULL) { @@ -280,7 +280,7 @@ static PyObject *sdk_OrthancPluginDicomInstance_OrthancPluginGetInstanceOrigin( sdk_OrthancPluginDicomInstance_Object* self, PyObject *args) { - OrthancPlugins::LogInfo("Calling method OrthancPluginGetInstanceOrigin() on object of class OrthancPluginDicomInstance"); + PythonLock::LogCall("Calling method OrthancPluginGetInstanceOrigin() on object of class OrthancPluginDicomInstance"); if (self->object_ == NULL) {
--- a/Sources/Autogenerated/sdk_OrthancPluginDicomWebNode.impl.h Tue Apr 07 07:52:07 2020 +0200 +++ b/Sources/Autogenerated/sdk_OrthancPluginDicomWebNode.impl.h Mon Apr 27 07:59:35 2020 +0200 @@ -39,7 +39,7 @@ static int sdk_OrthancPluginDicomWebNode_Constructor( sdk_OrthancPluginDicomWebNode_Object *self, PyObject *args, PyObject *kwds) { - OrthancPlugins::LogInfo("Creating Python object of class OrthancPluginDicomWebNode"); + PythonLock::LogCall("Creating Python object of class OrthancPluginDicomWebNode"); self->object_ = NULL; self->borrowed_ = false;
--- a/Sources/Autogenerated/sdk_OrthancPluginFindAnswers.impl.h Tue Apr 07 07:52:07 2020 +0200 +++ b/Sources/Autogenerated/sdk_OrthancPluginFindAnswers.impl.h Mon Apr 27 07:59:35 2020 +0200 @@ -49,7 +49,7 @@ static int sdk_OrthancPluginFindAnswers_Constructor( sdk_OrthancPluginFindAnswers_Object *self, PyObject *args, PyObject *kwds) { - OrthancPlugins::LogInfo("Creating Python object of class OrthancPluginFindAnswers"); + PythonLock::LogCall("Creating Python object of class OrthancPluginFindAnswers"); self->object_ = NULL; self->borrowed_ = false; @@ -89,7 +89,7 @@ static PyObject *sdk_OrthancPluginFindAnswers_OrthancPluginFindAddAnswer( sdk_OrthancPluginFindAnswers_Object* self, PyObject *args) { - OrthancPlugins::LogInfo("Calling method OrthancPluginFindAddAnswer() on object of class OrthancPluginFindAnswers"); + PythonLock::LogCall("Calling method OrthancPluginFindAddAnswer() on object of class OrthancPluginFindAnswers"); if (self->object_ == NULL) { @@ -127,7 +127,7 @@ static PyObject *sdk_OrthancPluginFindAnswers_OrthancPluginFindMarkIncomplete( sdk_OrthancPluginFindAnswers_Object* self, PyObject *args) { - OrthancPlugins::LogInfo("Calling method OrthancPluginFindMarkIncomplete() on object of class OrthancPluginFindAnswers"); + PythonLock::LogCall("Calling method OrthancPluginFindMarkIncomplete() on object of class OrthancPluginFindAnswers"); if (self->object_ == NULL) {
--- a/Sources/Autogenerated/sdk_OrthancPluginFindQuery.impl.h Tue Apr 07 07:52:07 2020 +0200 +++ b/Sources/Autogenerated/sdk_OrthancPluginFindQuery.impl.h Mon Apr 27 07:59:35 2020 +0200 @@ -54,7 +54,7 @@ static int sdk_OrthancPluginFindQuery_Constructor( sdk_OrthancPluginFindQuery_Object *self, PyObject *args, PyObject *kwds) { - OrthancPlugins::LogInfo("Creating Python object of class OrthancPluginFindQuery"); + PythonLock::LogCall("Creating Python object of class OrthancPluginFindQuery"); self->object_ = NULL; self->borrowed_ = false; @@ -94,7 +94,7 @@ static PyObject *sdk_OrthancPluginFindQuery_OrthancPluginGetFindQuerySize( sdk_OrthancPluginFindQuery_Object* self, PyObject *args) { - OrthancPlugins::LogInfo("Calling method OrthancPluginGetFindQuerySize() on object of class OrthancPluginFindQuery"); + PythonLock::LogCall("Calling method OrthancPluginGetFindQuerySize() on object of class OrthancPluginFindQuery"); if (self->object_ == NULL) { @@ -113,7 +113,7 @@ static PyObject *sdk_OrthancPluginFindQuery_OrthancPluginGetFindQueryTagName( sdk_OrthancPluginFindQuery_Object* self, PyObject *args) { - OrthancPlugins::LogInfo("Calling method OrthancPluginGetFindQueryTagName() on object of class OrthancPluginFindQuery"); + PythonLock::LogCall("Calling method OrthancPluginGetFindQueryTagName() on object of class OrthancPluginFindQuery"); if (self->object_ == NULL) { @@ -150,7 +150,7 @@ static PyObject *sdk_OrthancPluginFindQuery_OrthancPluginGetFindQueryValue( sdk_OrthancPluginFindQuery_Object* self, PyObject *args) { - OrthancPlugins::LogInfo("Calling method OrthancPluginGetFindQueryValue() on object of class OrthancPluginFindQuery"); + PythonLock::LogCall("Calling method OrthancPluginGetFindQueryValue() on object of class OrthancPluginFindQuery"); if (self->object_ == NULL) {
--- a/Sources/Autogenerated/sdk_OrthancPluginImage.impl.h Tue Apr 07 07:52:07 2020 +0200 +++ b/Sources/Autogenerated/sdk_OrthancPluginImage.impl.h Mon Apr 27 07:59:35 2020 +0200 @@ -69,7 +69,7 @@ static int sdk_OrthancPluginImage_Constructor( sdk_OrthancPluginImage_Object *self, PyObject *args, PyObject *kwds) { - OrthancPlugins::LogInfo("Creating Python object of class OrthancPluginImage"); + PythonLock::LogCall("Creating Python object of class OrthancPluginImage"); self->object_ = NULL; self->borrowed_ = false; @@ -105,7 +105,7 @@ static void sdk_OrthancPluginImage_Destructor(PyObject *self) { - OrthancPlugins::LogInfo("Destroying Python object of class OrthancPluginImage"); + PythonLock::LogCall("Destroying Python object of class OrthancPluginImage"); sdk_OrthancPluginImage_Object& tmp = *((sdk_OrthancPluginImage_Object*) self); @@ -124,7 +124,7 @@ static PyObject *sdk_OrthancPluginImage_OrthancPluginGetImagePixelFormat( sdk_OrthancPluginImage_Object* self, PyObject *args) { - OrthancPlugins::LogInfo("Calling method OrthancPluginGetImagePixelFormat() on object of class OrthancPluginImage"); + PythonLock::LogCall("Calling method OrthancPluginGetImagePixelFormat() on object of class OrthancPluginImage"); if (self->object_ == NULL) { @@ -143,7 +143,7 @@ static PyObject *sdk_OrthancPluginImage_OrthancPluginGetImageWidth( sdk_OrthancPluginImage_Object* self, PyObject *args) { - OrthancPlugins::LogInfo("Calling method OrthancPluginGetImageWidth() on object of class OrthancPluginImage"); + PythonLock::LogCall("Calling method OrthancPluginGetImageWidth() on object of class OrthancPluginImage"); if (self->object_ == NULL) { @@ -162,7 +162,7 @@ static PyObject *sdk_OrthancPluginImage_OrthancPluginGetImageHeight( sdk_OrthancPluginImage_Object* self, PyObject *args) { - OrthancPlugins::LogInfo("Calling method OrthancPluginGetImageHeight() on object of class OrthancPluginImage"); + PythonLock::LogCall("Calling method OrthancPluginGetImageHeight() on object of class OrthancPluginImage"); if (self->object_ == NULL) { @@ -181,7 +181,7 @@ static PyObject *sdk_OrthancPluginImage_OrthancPluginGetImagePitch( sdk_OrthancPluginImage_Object* self, PyObject *args) { - OrthancPlugins::LogInfo("Calling method OrthancPluginGetImagePitch() on object of class OrthancPluginImage"); + PythonLock::LogCall("Calling method OrthancPluginGetImagePitch() on object of class OrthancPluginImage"); if (self->object_ == NULL) { @@ -200,7 +200,7 @@ static PyObject *sdk_OrthancPluginImage_OrthancPluginConvertPixelFormat( sdk_OrthancPluginImage_Object* self, PyObject *args) { - OrthancPlugins::LogInfo("Calling method OrthancPluginConvertPixelFormat() on object of class OrthancPluginImage"); + PythonLock::LogCall("Calling method OrthancPluginConvertPixelFormat() on object of class OrthancPluginImage"); if (self->object_ == NULL) { @@ -240,7 +240,7 @@ static PyObject *sdk_OrthancPluginImage_OrthancPluginDrawText( sdk_OrthancPluginImage_Object* self, PyObject *args) { - OrthancPlugins::LogInfo("Calling method OrthancPluginDrawText() on object of class OrthancPluginImage"); + PythonLock::LogCall("Calling method OrthancPluginDrawText() on object of class OrthancPluginImage"); if (self->object_ == NULL) {
--- a/Sources/Autogenerated/sdk_OrthancPluginJob.impl.h Tue Apr 07 07:52:07 2020 +0200 +++ b/Sources/Autogenerated/sdk_OrthancPluginJob.impl.h Mon Apr 27 07:59:35 2020 +0200 @@ -44,7 +44,7 @@ static int sdk_OrthancPluginJob_Constructor( sdk_OrthancPluginJob_Object *self, PyObject *args, PyObject *kwds) { - OrthancPlugins::LogInfo("Creating Python object of class OrthancPluginJob"); + PythonLock::LogCall("Creating Python object of class OrthancPluginJob"); self->object_ = NULL; self->borrowed_ = false; @@ -80,7 +80,7 @@ static void sdk_OrthancPluginJob_Destructor(PyObject *self) { - OrthancPlugins::LogInfo("Destroying Python object of class OrthancPluginJob"); + PythonLock::LogCall("Destroying Python object of class OrthancPluginJob"); sdk_OrthancPluginJob_Object& tmp = *((sdk_OrthancPluginJob_Object*) self); @@ -99,7 +99,7 @@ static PyObject *sdk_OrthancPluginJob_OrthancPluginSubmitJob( sdk_OrthancPluginJob_Object* self, PyObject *args) { - OrthancPlugins::LogInfo("Calling method OrthancPluginSubmitJob() on object of class OrthancPluginJob"); + PythonLock::LogCall("Calling method OrthancPluginSubmitJob() on object of class OrthancPluginJob"); if (self->object_ == NULL) {
--- a/Sources/Autogenerated/sdk_OrthancPluginPeers.impl.h Tue Apr 07 07:52:07 2020 +0200 +++ b/Sources/Autogenerated/sdk_OrthancPluginPeers.impl.h Mon Apr 27 07:59:35 2020 +0200 @@ -59,7 +59,7 @@ static int sdk_OrthancPluginPeers_Constructor( sdk_OrthancPluginPeers_Object *self, PyObject *args, PyObject *kwds) { - OrthancPlugins::LogInfo("Creating Python object of class OrthancPluginPeers"); + PythonLock::LogCall("Creating Python object of class OrthancPluginPeers"); self->object_ = NULL; self->borrowed_ = false; @@ -95,7 +95,7 @@ static void sdk_OrthancPluginPeers_Destructor(PyObject *self) { - OrthancPlugins::LogInfo("Destroying Python object of class OrthancPluginPeers"); + PythonLock::LogCall("Destroying Python object of class OrthancPluginPeers"); sdk_OrthancPluginPeers_Object& tmp = *((sdk_OrthancPluginPeers_Object*) self); @@ -114,7 +114,7 @@ static PyObject *sdk_OrthancPluginPeers_OrthancPluginGetPeersCount( sdk_OrthancPluginPeers_Object* self, PyObject *args) { - OrthancPlugins::LogInfo("Calling method OrthancPluginGetPeersCount() on object of class OrthancPluginPeers"); + PythonLock::LogCall("Calling method OrthancPluginGetPeersCount() on object of class OrthancPluginPeers"); if (self->object_ == NULL) { @@ -133,7 +133,7 @@ static PyObject *sdk_OrthancPluginPeers_OrthancPluginGetPeerName( sdk_OrthancPluginPeers_Object* self, PyObject *args) { - OrthancPlugins::LogInfo("Calling method OrthancPluginGetPeerName() on object of class OrthancPluginPeers"); + PythonLock::LogCall("Calling method OrthancPluginGetPeerName() on object of class OrthancPluginPeers"); if (self->object_ == NULL) { @@ -167,7 +167,7 @@ static PyObject *sdk_OrthancPluginPeers_OrthancPluginGetPeerUrl( sdk_OrthancPluginPeers_Object* self, PyObject *args) { - OrthancPlugins::LogInfo("Calling method OrthancPluginGetPeerUrl() on object of class OrthancPluginPeers"); + PythonLock::LogCall("Calling method OrthancPluginGetPeerUrl() on object of class OrthancPluginPeers"); if (self->object_ == NULL) { @@ -201,7 +201,7 @@ static PyObject *sdk_OrthancPluginPeers_OrthancPluginGetPeerUserProperty( sdk_OrthancPluginPeers_Object* self, PyObject *args) { - OrthancPlugins::LogInfo("Calling method OrthancPluginGetPeerUserProperty() on object of class OrthancPluginPeers"); + PythonLock::LogCall("Calling method OrthancPluginGetPeerUserProperty() on object of class OrthancPluginPeers"); if (self->object_ == NULL) {
--- a/Sources/Autogenerated/sdk_OrthancPluginRestOutput.impl.h Tue Apr 07 07:52:07 2020 +0200 +++ b/Sources/Autogenerated/sdk_OrthancPluginRestOutput.impl.h Mon Apr 27 07:59:35 2020 +0200 @@ -104,7 +104,7 @@ static int sdk_OrthancPluginRestOutput_Constructor( sdk_OrthancPluginRestOutput_Object *self, PyObject *args, PyObject *kwds) { - OrthancPlugins::LogInfo("Creating Python object of class OrthancPluginRestOutput"); + PythonLock::LogCall("Creating Python object of class OrthancPluginRestOutput"); self->object_ = NULL; self->borrowed_ = false; @@ -144,7 +144,7 @@ static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginAnswerBuffer( sdk_OrthancPluginRestOutput_Object* self, PyObject *args) { - OrthancPlugins::LogInfo("Calling method OrthancPluginAnswerBuffer() on object of class OrthancPluginRestOutput"); + PythonLock::LogCall("Calling method OrthancPluginAnswerBuffer() on object of class OrthancPluginRestOutput"); if (self->object_ == NULL) { @@ -173,7 +173,7 @@ static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginCompressAndAnswerPngImage( sdk_OrthancPluginRestOutput_Object* self, PyObject *args) { - OrthancPlugins::LogInfo("Calling method OrthancPluginCompressAndAnswerPngImage() on object of class OrthancPluginRestOutput"); + PythonLock::LogCall("Calling method OrthancPluginCompressAndAnswerPngImage() on object of class OrthancPluginRestOutput"); if (self->object_ == NULL) { @@ -205,7 +205,7 @@ static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginRedirect( sdk_OrthancPluginRestOutput_Object* self, PyObject *args) { - OrthancPlugins::LogInfo("Calling method OrthancPluginRedirect() on object of class OrthancPluginRestOutput"); + PythonLock::LogCall("Calling method OrthancPluginRedirect() on object of class OrthancPluginRestOutput"); if (self->object_ == NULL) { @@ -233,7 +233,7 @@ static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginSendHttpStatusCode( sdk_OrthancPluginRestOutput_Object* self, PyObject *args) { - OrthancPlugins::LogInfo("Calling method OrthancPluginSendHttpStatusCode() on object of class OrthancPluginRestOutput"); + PythonLock::LogCall("Calling method OrthancPluginSendHttpStatusCode() on object of class OrthancPluginRestOutput"); if (self->object_ == NULL) { @@ -261,7 +261,7 @@ static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginSendUnauthorized( sdk_OrthancPluginRestOutput_Object* self, PyObject *args) { - OrthancPlugins::LogInfo("Calling method OrthancPluginSendUnauthorized() on object of class OrthancPluginRestOutput"); + PythonLock::LogCall("Calling method OrthancPluginSendUnauthorized() on object of class OrthancPluginRestOutput"); if (self->object_ == NULL) { @@ -289,7 +289,7 @@ static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginSendMethodNotAllowed( sdk_OrthancPluginRestOutput_Object* self, PyObject *args) { - OrthancPlugins::LogInfo("Calling method OrthancPluginSendMethodNotAllowed() on object of class OrthancPluginRestOutput"); + PythonLock::LogCall("Calling method OrthancPluginSendMethodNotAllowed() on object of class OrthancPluginRestOutput"); if (self->object_ == NULL) { @@ -317,7 +317,7 @@ static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginSetCookie( sdk_OrthancPluginRestOutput_Object* self, PyObject *args) { - OrthancPlugins::LogInfo("Calling method OrthancPluginSetCookie() on object of class OrthancPluginRestOutput"); + PythonLock::LogCall("Calling method OrthancPluginSetCookie() on object of class OrthancPluginRestOutput"); if (self->object_ == NULL) { @@ -346,7 +346,7 @@ static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginSetHttpHeader( sdk_OrthancPluginRestOutput_Object* self, PyObject *args) { - OrthancPlugins::LogInfo("Calling method OrthancPluginSetHttpHeader() on object of class OrthancPluginRestOutput"); + PythonLock::LogCall("Calling method OrthancPluginSetHttpHeader() on object of class OrthancPluginRestOutput"); if (self->object_ == NULL) { @@ -375,7 +375,7 @@ static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginStartMultipartAnswer( sdk_OrthancPluginRestOutput_Object* self, PyObject *args) { - OrthancPlugins::LogInfo("Calling method OrthancPluginStartMultipartAnswer() on object of class OrthancPluginRestOutput"); + PythonLock::LogCall("Calling method OrthancPluginStartMultipartAnswer() on object of class OrthancPluginRestOutput"); if (self->object_ == NULL) { @@ -414,7 +414,7 @@ static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginSendMultipartItem( sdk_OrthancPluginRestOutput_Object* self, PyObject *args) { - OrthancPlugins::LogInfo("Calling method OrthancPluginSendMultipartItem() on object of class OrthancPluginRestOutput"); + PythonLock::LogCall("Calling method OrthancPluginSendMultipartItem() on object of class OrthancPluginRestOutput"); if (self->object_ == NULL) { @@ -453,7 +453,7 @@ static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginSendHttpStatus( sdk_OrthancPluginRestOutput_Object* self, PyObject *args) { - OrthancPlugins::LogInfo("Calling method OrthancPluginSendHttpStatus() on object of class OrthancPluginRestOutput"); + PythonLock::LogCall("Calling method OrthancPluginSendHttpStatus() on object of class OrthancPluginRestOutput"); if (self->object_ == NULL) { @@ -483,7 +483,7 @@ static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginCompressAndAnswerJpegImage( sdk_OrthancPluginRestOutput_Object* self, PyObject *args) { - OrthancPlugins::LogInfo("Calling method OrthancPluginCompressAndAnswerJpegImage() on object of class OrthancPluginRestOutput"); + PythonLock::LogCall("Calling method OrthancPluginCompressAndAnswerJpegImage() on object of class OrthancPluginRestOutput"); if (self->object_ == NULL) { @@ -516,7 +516,7 @@ static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginSetHttpErrorDetails( sdk_OrthancPluginRestOutput_Object* self, PyObject *args) { - OrthancPlugins::LogInfo("Calling method OrthancPluginSetHttpErrorDetails() on object of class OrthancPluginRestOutput"); + PythonLock::LogCall("Calling method OrthancPluginSetHttpErrorDetails() on object of class OrthancPluginRestOutput"); if (self->object_ == NULL) {
--- a/Sources/Autogenerated/sdk_OrthancPluginServerChunkedRequestReader.impl.h Tue Apr 07 07:52:07 2020 +0200 +++ b/Sources/Autogenerated/sdk_OrthancPluginServerChunkedRequestReader.impl.h Mon Apr 27 07:59:35 2020 +0200 @@ -39,7 +39,7 @@ static int sdk_OrthancPluginServerChunkedRequestReader_Constructor( sdk_OrthancPluginServerChunkedRequestReader_Object *self, PyObject *args, PyObject *kwds) { - OrthancPlugins::LogInfo("Creating Python object of class OrthancPluginServerChunkedRequestReader"); + PythonLock::LogCall("Creating Python object of class OrthancPluginServerChunkedRequestReader"); self->object_ = NULL; self->borrowed_ = false;
--- a/Sources/Autogenerated/sdk_OrthancPluginStorageArea.impl.h Tue Apr 07 07:52:07 2020 +0200 +++ b/Sources/Autogenerated/sdk_OrthancPluginStorageArea.impl.h Mon Apr 27 07:59:35 2020 +0200 @@ -59,7 +59,7 @@ static int sdk_OrthancPluginStorageArea_Constructor( sdk_OrthancPluginStorageArea_Object *self, PyObject *args, PyObject *kwds) { - OrthancPlugins::LogInfo("Creating Python object of class OrthancPluginStorageArea"); + PythonLock::LogCall("Creating Python object of class OrthancPluginStorageArea"); self->object_ = NULL; self->borrowed_ = false; @@ -99,7 +99,7 @@ static PyObject *sdk_OrthancPluginStorageArea_OrthancPluginStorageAreaCreate( sdk_OrthancPluginStorageArea_Object* self, PyObject *args) { - OrthancPlugins::LogInfo("Calling method OrthancPluginStorageAreaCreate() on object of class OrthancPluginStorageArea"); + PythonLock::LogCall("Calling method OrthancPluginStorageAreaCreate() on object of class OrthancPluginStorageArea"); if (self->object_ == NULL) { @@ -140,7 +140,7 @@ static PyObject *sdk_OrthancPluginStorageArea_OrthancPluginStorageAreaRead( sdk_OrthancPluginStorageArea_Object* self, PyObject *args) { - OrthancPlugins::LogInfo("Calling method OrthancPluginStorageAreaRead() on object of class OrthancPluginStorageArea"); + PythonLock::LogCall("Calling method OrthancPluginStorageAreaRead() on object of class OrthancPluginStorageArea"); if (self->object_ == NULL) { @@ -178,7 +178,7 @@ static PyObject *sdk_OrthancPluginStorageArea_OrthancPluginStorageAreaRemove( sdk_OrthancPluginStorageArea_Object* self, PyObject *args) { - OrthancPlugins::LogInfo("Calling method OrthancPluginStorageAreaRemove() on object of class OrthancPluginStorageArea"); + PythonLock::LogCall("Calling method OrthancPluginStorageAreaRemove() on object of class OrthancPluginStorageArea"); if (self->object_ == NULL) { @@ -217,7 +217,7 @@ static PyObject *sdk_OrthancPluginStorageArea_OrthancPluginReconstructMainDicomTags( sdk_OrthancPluginStorageArea_Object* self, PyObject *args) { - OrthancPlugins::LogInfo("Calling method OrthancPluginReconstructMainDicomTags() on object of class OrthancPluginStorageArea"); + PythonLock::LogCall("Calling method OrthancPluginReconstructMainDicomTags() on object of class OrthancPluginStorageArea"); if (self->object_ == NULL) {
--- a/Sources/Autogenerated/sdk_OrthancPluginWorklistAnswers.impl.h Tue Apr 07 07:52:07 2020 +0200 +++ b/Sources/Autogenerated/sdk_OrthancPluginWorklistAnswers.impl.h Mon Apr 27 07:59:35 2020 +0200 @@ -44,7 +44,7 @@ static int sdk_OrthancPluginWorklistAnswers_Constructor( sdk_OrthancPluginWorklistAnswers_Object *self, PyObject *args, PyObject *kwds) { - OrthancPlugins::LogInfo("Creating Python object of class OrthancPluginWorklistAnswers"); + PythonLock::LogCall("Creating Python object of class OrthancPluginWorklistAnswers"); self->object_ = NULL; self->borrowed_ = false; @@ -84,7 +84,7 @@ static PyObject *sdk_OrthancPluginWorklistAnswers_OrthancPluginWorklistMarkIncomplete( sdk_OrthancPluginWorklistAnswers_Object* self, PyObject *args) { - OrthancPlugins::LogInfo("Calling method OrthancPluginWorklistMarkIncomplete() on object of class OrthancPluginWorklistAnswers"); + PythonLock::LogCall("Calling method OrthancPluginWorklistMarkIncomplete() on object of class OrthancPluginWorklistAnswers"); if (self->object_ == NULL) {
--- a/Sources/Autogenerated/sdk_OrthancPluginWorklistQuery.impl.h Tue Apr 07 07:52:07 2020 +0200 +++ b/Sources/Autogenerated/sdk_OrthancPluginWorklistQuery.impl.h Mon Apr 27 07:59:35 2020 +0200 @@ -49,7 +49,7 @@ static int sdk_OrthancPluginWorklistQuery_Constructor( sdk_OrthancPluginWorklistQuery_Object *self, PyObject *args, PyObject *kwds) { - OrthancPlugins::LogInfo("Creating Python object of class OrthancPluginWorklistQuery"); + PythonLock::LogCall("Creating Python object of class OrthancPluginWorklistQuery"); self->object_ = NULL; self->borrowed_ = false; @@ -89,7 +89,7 @@ static PyObject *sdk_OrthancPluginWorklistQuery_OrthancPluginWorklistIsMatch( sdk_OrthancPluginWorklistQuery_Object* self, PyObject *args) { - OrthancPlugins::LogInfo("Calling method OrthancPluginWorklistIsMatch() on object of class OrthancPluginWorklistQuery"); + PythonLock::LogCall("Calling method OrthancPluginWorklistIsMatch() on object of class OrthancPluginWorklistQuery"); if (self->object_ == NULL) { @@ -115,7 +115,7 @@ static PyObject *sdk_OrthancPluginWorklistQuery_OrthancPluginWorklistGetDicomQuery( sdk_OrthancPluginWorklistQuery_Object* self, PyObject *args) { - OrthancPlugins::LogInfo("Calling method OrthancPluginWorklistGetDicomQuery() on object of class OrthancPluginWorklistQuery"); + PythonLock::LogCall("Calling method OrthancPluginWorklistGetDicomQuery() on object of class OrthancPluginWorklistQuery"); if (self->object_ == NULL) {
--- a/Sources/PythonLock.cpp Tue Apr 07 07:52:07 2020 +0200 +++ b/Sources/PythonLock.cpp Mon Apr 27 07:59:35 2020 +0200 @@ -32,6 +32,7 @@ static PythonLock::ModuleClassesInstaller moduleClasses_ = NULL; static std::string moduleName_; static std::string exceptionName_; +static bool verbose_ = false; struct module_state @@ -345,6 +346,7 @@ Py_InspectFlag = 1; // Don't exit the Orthanc process on Python error + verbose_ = verbose; if (verbose) { Py_VerboseFlag = 1; @@ -469,3 +471,18 @@ } } } + + +void PythonLock::LogCall(const std::string& message) +{ + /** + * For purity, this function should lock the global "mutex_", but + * "verbose_" cannot change after the initial call to + * "GlobalInitialize()". + **/ + + if (verbose_) + { + OrthancPlugins::LogInfo(message); + } +}