Mercurial > hg > orthanc
comparison OrthancServer/Plugins/Samples/MultitenantDicom/Plugin.cpp @ 5561:0b18690c1935
SDK: added OrthancPluginLogMessage to display plugin name + file and line from plugin
author | Alain Mazy <am@orthanc.team> |
---|---|
date | Tue, 23 Apr 2024 09:34:02 +0200 |
parents | dce22a789a2b |
children | e02cdf358905 |
comparison
equal
deleted
inserted
replaced
5560:c80dbbae3f60 | 5561:0b18690c1935 |
---|---|
118 | 118 |
119 extern "C" | 119 extern "C" |
120 { | 120 { |
121 ORTHANC_PLUGINS_API int32_t OrthancPluginInitialize(OrthancPluginContext* context) | 121 ORTHANC_PLUGINS_API int32_t OrthancPluginInitialize(OrthancPluginContext* context) |
122 { | 122 { |
123 OrthancPlugins::SetGlobalContext(context); | 123 OrthancPlugins::SetGlobalContext(context, ORTHANC_PLUGIN_NAME); |
124 | 124 |
125 /* Check the version of the Orthanc core */ | 125 /* Check the version of the Orthanc core */ |
126 if (OrthancPluginCheckVersion(OrthancPlugins::GetGlobalContext()) == 0) | 126 if (OrthancPluginCheckVersion(OrthancPlugins::GetGlobalContext()) == 0) |
127 { | 127 { |
128 char info[1024]; | 128 char info[1024]; |
139 Orthanc::Logging::InitializePluginContext(context); | 139 Orthanc::Logging::InitializePluginContext(context); |
140 #else | 140 #else |
141 Orthanc::Logging::Initialize(context); | 141 Orthanc::Logging::Initialize(context); |
142 #endif | 142 #endif |
143 | 143 |
144 if (!OrthancPlugins::CheckMinimalOrthancVersion(1, 12, 0)) | 144 if (!OrthancPlugins::CheckMinimalOrthancVersion(1, 12, 4)) |
145 { | 145 { |
146 OrthancPlugins::ReportMinimalOrthancVersion(1, 12, 0); | 146 OrthancPlugins::ReportMinimalOrthancVersion(1, 12, 4); |
147 return -1; | 147 return -1; |
148 } | 148 } |
149 | 149 |
150 OrthancPluginSetDescription2(context, ORTHANC_PLUGIN_NAME, "Multitenant plugin for Orthanc."); | 150 OrthancPluginSetDescription2(context, ORTHANC_PLUGIN_NAME, "Multitenant plugin for Orthanc."); |
151 | 151 |