Message297

Author admin
Recipients
Date 2017-09-05.17:04:49
Content
[BitBucket user: Alain Mazy]
[BitBucket date: 2017-09-05.15:04:49]

Creating this issue to collect all kind of improvements about logging.  We'll create dedicated tasks for each improvement when we decide to go for it

# change logging configuration on the fly #
Through a Rest API command to avoid a reboot and record info only for the time of a few requests ...  could be combined with the different levels for various modules

# different levels for various modules (nice to have)#
We often need to debug DICOM interactions and logs are 'polluted' by logs from the Rest API, i.e: since I have a process calling the /changes route every 5 second, I'm lost in 17000 /changes record in my logs everyday while I just want to check what kind of C-Find requests are issued by a modality.  
If we go for it, logs could be configured via the configuration file: i.e.:
```
{
  "Web": "info",
  "Dicom": "debug",
  "Db": "warning",
  "WebViewer": "warning", // here WebViewer is a plugin
  "Generic": "warning", // for all stuffs we could not port to the new logging API or old plugins ....
}
```
I understand that this is quite a huge change but this can improve our life quite a lot !

# better exception reporting from plugins
We get a few of these errors and have no idea where they come from:
```
E0913 06:31:25.695783 PluginsErrorDictionary.cpp:111] Exception inside the plugin engine: Unknown resource
```
We should try to log the name of the plugin causing the error + i.e: log the resource that is 'unknown' -> add a message payload to the exception if not already the case.

# Every error in Orthanc Rest API shall be logged
Ex: On a CentOS machine with Selinux enabled, an Orthanc container did not had the right to write on the Docker Volume.  The upload to /instances received a 400 error code but the last log was showing "creating attachment ..." and no error message afterwards.
History
Date User Action Args
2026-07-29 15:51:21adminlinkissue65 messages
2026-07-29 15:51:21admincreate