Hi James,
We have indeed slightly modified logging wrt plugins in 1.12.4. The change allows us to log the plugin name, plugin file name and line number in the logs so if I run:
docker run -p 4243:4242 -e WORKLISTS_PLUGIN_ENABLED=true -e VERBOSE_ENABLED=true -e ORTHANC__DICOM_ALWAYS_ALLOW_FIND_WORKLIST=true orthancteam/orthanc:24.6.1
and
findscu -v -W -k "PatientName=" -k "(0040,0100)[0].Modality=MR" localhost 4243
I get logs from the worklist plugin since I have enabled verbose logs in general:
I0612 15:32:11.174419 DICOM-1 worklists:/Plugin.cpp:81] Received worklist query from remote modality FINDSCU:
{
"0010,0010" : "",
"0040,0100" :
[
{
"0008,0060" : "MR"
}
]
}
E0612 15:32:11.174584 DICOM-1 worklists:/Plugin.cpp:201] Inexistent folder while scanning for worklists: /var/lib/orthanc/worklists
But, indeed, if I enable only the plugins category logs at verbose level:
docker run -p 4243:4242 -p 8043:8042 -e WORKLISTS_PLUGIN_ENABLED=true -e ORTHANC__DICOM_ALWAYS_ALLOW_FIND_WORKLIST=true orthancteam/orthanc:24.6.1
curl -u orthanc:orthanc -X PUT http://localhost:8043/tools/log-level-plugins -d "verbose"
I only get the error logs and not the info level.
This happens because, with the new logging primitives, the plugins are now able to use other categories than the plugins
one but, by default, they are now using the generic
category.
@jodogne, is there a C++ define that we could use to detect if we are using the Orthanc Framework from a plugin and therefore, define another default value LogCategory_PLUGINS
for the category in LOG() functions ?
# define LOG(level) ::Orthanc::Logging::InternalLogger \
(::Orthanc::Logging::LogLevel_ ## level, \
::Orthanc::Logging::LogCategory_GENERIC, NULL /* no plugin */, \
__ORTHANC_FILE__, __LINE__)