Mercurial > hg > orthanc
diff OrthancServer/Plugins/Samples/MultitenantDicom/Plugin.cpp @ 5563:e02cdf358905
fix plugin init wrt logging
author | Alain Mazy <am@orthanc.team> |
---|---|
date | Tue, 23 Apr 2024 10:26:48 +0200 |
parents | 0b18690c1935 |
children | f7adfb22e20e |
line wrap: on
line diff
--- a/OrthancServer/Plugins/Samples/MultitenantDicom/Plugin.cpp Tue Apr 23 09:34:02 2024 +0200 +++ b/OrthancServer/Plugins/Samples/MultitenantDicom/Plugin.cpp Tue Apr 23 10:26:48 2024 +0200 @@ -121,6 +121,7 @@ ORTHANC_PLUGINS_API int32_t OrthancPluginInitialize(OrthancPluginContext* context) { OrthancPlugins::SetGlobalContext(context, ORTHANC_PLUGIN_NAME); + Orthanc::Logging::InitializePluginContext(context, ORTHANC_PLUGIN_NAME); /* Check the version of the Orthanc core */ if (OrthancPluginCheckVersion(OrthancPlugins::GetGlobalContext()) == 0) @@ -135,18 +136,6 @@ return -1; } -#if ORTHANC_FRAMEWORK_VERSION_IS_ABOVE(1, 7, 2) - Orthanc::Logging::InitializePluginContext(context); -#else - Orthanc::Logging::Initialize(context); -#endif - - if (!OrthancPlugins::CheckMinimalOrthancVersion(1, 12, 4)) - { - OrthancPlugins::ReportMinimalOrthancVersion(1, 12, 4); - return -1; - } - OrthancPluginSetDescription2(context, ORTHANC_PLUGIN_NAME, "Multitenant plugin for Orthanc."); OrthancPluginRegisterOnChangeCallback(context, OnChangeCallback);