[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.
[BitBucket user: Michael Hobbs] [BitBucket date: 2019-01-13.16:29:21] Thumbs up on this. Recommend an option to print the hostname as part of a logline. This would be useful in a Docker Stack deployment.
[BitBucket user: Sébastien Jodogne] [BitBucket date: 2020-02-14.16:22:34] Fix issue #65 (Logging improvements) → https://hg.orthanc-server.com/orthanc/changeset/ea8c1c0e81eb