From fd93fb0f8290fa96b62a21fb4ac24316a08b3911 Mon Sep 17 00:00:00 2001 From: Tim Schmitz Date: Fri, 31 Jul 2026 15:57:16 +0200 Subject: [PATCH 1/4] documentation for changes in ilias.ini.php, adapt ilias.master.ini.php --- .../ILIAS/Init/resources/ilias.master.ini.php | 50 +++++++++---------- components/ILIAS/Logging/src/Setup/Config.php | 2 +- components/ILIAS/Setup/README.md | 2 + docs/configuration/install.md | 1 + docs/configuration/settings/ini-file.md | 2 +- 5 files changed, 30 insertions(+), 27 deletions(-) diff --git a/components/ILIAS/Init/resources/ilias.master.ini.php b/components/ILIAS/Init/resources/ilias.master.ini.php index b30b3ace9f86..83749723826b 100755 --- a/components/ILIAS/Init/resources/ilias.master.ini.php +++ b/components/ILIAS/Init/resources/ilias.master.ini.php @@ -35,13 +35,13 @@ [server] http_path = absolute_path = -presetting = +presetting = [clients] path = public/data inifile = client.ini.php -datadir = -default = +datadir = +default = list = 0 [setup] @@ -49,17 +49,17 @@ [tools] convert = -zip = -unzip = -java = -ffmpeg = +zip = +unzip = +java = +ffmpeg = [log] -path = -file = +path = +file = enabled = 1 -level = WARNING -error_path = +default_level = INFO +error_path = [debian] data_dir = /var/opt/ilias @@ -67,26 +67,26 @@ convert = /usr/bin/convert zip = /usr/bin/zip unzip = /usr/bin/unzip -java = +java = ffmpeg = /usr/bin/ffmpeg [redhat] -data_dir = -log = -convert = -zip = -unzip = -java = +data_dir = +log = +convert = +zip = +unzip = +java = [suse] -data_dir = -log = -convert = -zip = -unzip = -java = +data_dir = +log = +convert = +zip = +unzip = +java = [https] auto_https_detect_enabled = 0 -auto_https_detect_header_name = +auto_https_detect_header_name = auto_https_detect_header_value = diff --git a/components/ILIAS/Logging/src/Setup/Config.php b/components/ILIAS/Logging/src/Setup/Config.php index 44e9a6f5f9e6..9a1cdff98d89 100755 --- a/components/ILIAS/Logging/src/Setup/Config.php +++ b/components/ILIAS/Logging/src/Setup/Config.php @@ -42,7 +42,7 @@ public function __construct( "Expected a path to the logfile, if logging is enabled." ); } - $level = $level === null ? null : ILIASLogLevel::tryFromString($level); + $level = $level === null ? null : ILIASLogLevel::tryFromString(strtoupper($level)); if ($enabled && !$level) { throw new InvalidArgumentException( "Expected a valid default log level, if logging is enabled." diff --git a/components/ILIAS/Setup/README.md b/components/ILIAS/Setup/README.md index 3e9e8265f22e..22774126996a 100755 --- a/components/ILIAS/Setup/README.md +++ b/components/ILIAS/Setup/README.md @@ -585,11 +585,13 @@ are printed bold**, all other fields might be omitted. A minimal example is "logging" : { "enable" : true, "path_to_logfile" : "/var/log/ilias_test7.log", + "default_level" : "INFO" "errorlog_dir" : "/var/log/ilias_errorlogs/" }, ``` * *enable* (type: boolean) the logging, defaults to `false` * *path_to_logfile* (type: string) to be used for logging + * *default_level* (type: string) default log level, possible values: `DEBUG`, `INFO`, `NOTICE`, `WARNING`, `ERROR`, `CRITICAL`, `ALERT`, `EMERGENCY` * *errorlog_dir* (type: string) to put error logs in * *preview* (type: object) contains settings for ILIAS/Preview ``` diff --git a/docs/configuration/install.md b/docs/configuration/install.md index 781696c54381..496096c274d5 100755 --- a/docs/configuration/install.md +++ b/docs/configuration/install.md @@ -368,6 +368,7 @@ A typical configuration might look like this afterwards: "logging" : { "enable" : true, "path_to_logfile" : "/var/www/logs/ilias.log", + "default_level" : "INFO", "errorlog_dir" : "/var/www/logs/" }, "http" : { diff --git a/docs/configuration/settings/ini-file.md b/docs/configuration/settings/ini-file.md index 74255619bf74..964883869fe0 100755 --- a/docs/configuration/settings/ini-file.md +++ b/docs/configuration/settings/ini-file.md @@ -39,7 +39,7 @@ to the webserver. These files are located here: | path | "/var/iliasdata" | | | file | "ilias.log" | | | enabled | "1" | | -| level | "WARNING" | | +| default_level | "WARNING" | | | error_path | "/var/iliasdata" | | | [debian] | | | | data_dir | "/var/opt/ilias" | | From 59fcaa7536997fcc104447490da00f2da6630c72 Mon Sep 17 00:00:00 2001 From: Tim Schmitz Date: Fri, 31 Jul 2026 16:09:52 +0200 Subject: [PATCH 2/4] remove logging tag from service/module.xml --- components/ILIAS/AccessControl/service.xml | 3 +-- components/ILIAS/Administration/service.xml | 1 - components/ILIAS/AdministrativeNotification/service.xml | 1 - components/ILIAS/AdvancedMetaData/service.xml | 1 - components/ILIAS/Authentication/service.xml | 3 +-- components/ILIAS/Awareness/service.xml | 1 - components/ILIAS/BackgroundTasks_/service.xml | 2 -- components/ILIAS/Benchmark/service.xml | 1 - components/ILIAS/BookingManager/module.xml | 1 - components/ILIAS/COPage/service.xml | 1 - components/ILIAS/Calendar/service.xml | 3 +-- components/ILIAS/Category/module.xml | 3 +-- components/ILIAS/Certificate/service.xml | 1 - components/ILIAS/Chatroom/module.xml | 1 - components/ILIAS/CmiXapi/module.xml | 1 - components/ILIAS/Contact/service.xml | 1 - components/ILIAS/Container/service.xml | 1 - components/ILIAS/Course/module.xml | 1 - components/ILIAS/CourseReference/module.xml | 1 - components/ILIAS/Cron/service.xml | 1 - components/ILIAS/DataProtection/service.xml | 1 - components/ILIAS/Database/service.xml | 3 +-- components/ILIAS/DidacticTemplate/service.xml | 1 - components/ILIAS/EventHandling/service.xml | 1 - components/ILIAS/Exercise/module.xml | 5 ++--- components/ILIAS/Export/service.xml | 3 +-- components/ILIAS/File/module.xml | 1 - components/ILIAS/FileServices/service.xml | 1 - components/ILIAS/Forum/module.xml | 5 ++--- components/ILIAS/GlobalScreen/service.xml | 1 - components/ILIAS/Glossary/module.xml | 1 - components/ILIAS/Group/module.xml | 3 +-- components/ILIAS/ILIASObject/service.xml | 1 - components/ILIAS/Init/service.xml | 1 - components/ILIAS/LTIConsumer/module.xml | 1 - components/ILIAS/LTIProvider/service.xml | 1 - components/ILIAS/Language/service.xml | 1 - components/ILIAS/LearningHistory/service.xml | 3 +-- components/ILIAS/LearningModule/module.xml | 1 - components/ILIAS/LegalDocuments/service.xml | 1 - components/ILIAS/Logging/service.xml | 1 - components/ILIAS/Mail/service.xml | 1 - components/ILIAS/MainMenu/service.xml | 1 - components/ILIAS/Maps/service.xml | 1 - components/ILIAS/MediaCast/module.xml | 1 - components/ILIAS/MediaObjects/service.xml | 1 - components/ILIAS/MediaPool/module.xml | 3 +-- components/ILIAS/Membership/service.xml | 1 - components/ILIAS/MetaData/service.xml | 1 - components/ILIAS/News/service.xml | 3 +-- components/ILIAS/Notes/service.xml | 1 - components/ILIAS/Notification/service.xml | 1 - components/ILIAS/Notifications/service.xml | 1 - components/ILIAS/OnScreenChat/service.xml | 3 +-- components/ILIAS/PersonalWorkspace/service.xml | 1 - components/ILIAS/Repository/service.xml | 1 - components/ILIAS/ResourceStorage/service.xml | 1 - components/ILIAS/Scorm2004/module.xml | 1 - components/ILIAS/Search/service.xml | 1 - components/ILIAS/Session/module.xml | 1 - components/ILIAS/Skill/service.xml | 1 - components/ILIAS/Style/service.xml | 1 - components/ILIAS/Survey/module.xml | 1 - components/ILIAS/SurveyQuestionPool/module.xml | 1 - components/ILIAS/SystemCheck/service.xml | 3 +-- components/ILIAS/TermsOfService/service.xml | 1 - components/ILIAS/Tracking/service.xml | 5 ++--- components/ILIAS/Tree/service.xml | 3 +-- components/ILIAS/User/service.xml | 1 - components/ILIAS/WOPI/service.xml | 1 - components/ILIAS/WebDAV/service.xml | 1 - components/ILIAS/WebResource/module.xml | 1 - components/ILIAS/WebServices/service.xml | 3 +-- components/ILIAS/Wiki/module.xml | 1 - 74 files changed, 20 insertions(+), 95 deletions(-) diff --git a/components/ILIAS/AccessControl/service.xml b/components/ILIAS/AccessControl/service.xml index 61d097e94d6b..e065b36aba75 100755 --- a/components/ILIAS/AccessControl/service.xml +++ b/components/ILIAS/AccessControl/service.xml @@ -17,9 +17,8 @@ checkbox="1" inherit="0" translate="0" rbac="0"> - + - diff --git a/components/ILIAS/Administration/service.xml b/components/ILIAS/Administration/service.xml index f4f5a4968e3d..9e289cbe4d64 100755 --- a/components/ILIAS/Administration/service.xml +++ b/components/ILIAS/Administration/service.xml @@ -23,5 +23,4 @@ adm - diff --git a/components/ILIAS/AdministrativeNotification/service.xml b/components/ILIAS/AdministrativeNotification/service.xml index c65aaae0a0eb..f6f39e6753de 100755 --- a/components/ILIAS/AdministrativeNotification/service.xml +++ b/components/ILIAS/AdministrativeNotification/service.xml @@ -1,7 +1,6 @@ - adm diff --git a/components/ILIAS/AdvancedMetaData/service.xml b/components/ILIAS/AdvancedMetaData/service.xml index f358bbc4a771..c74b701d7fd0 100755 --- a/components/ILIAS/AdvancedMetaData/service.xml +++ b/components/ILIAS/AdvancedMetaData/service.xml @@ -8,5 +8,4 @@ - diff --git a/components/ILIAS/Authentication/service.xml b/components/ILIAS/Authentication/service.xml index ab8ba0262925..c43ddc670e55 100755 --- a/components/ILIAS/Authentication/service.xml +++ b/components/ILIAS/Authentication/service.xml @@ -9,7 +9,7 @@ adm - + @@ -22,7 +22,6 @@ - diff --git a/components/ILIAS/Awareness/service.xml b/components/ILIAS/Awareness/service.xml index cd41b4661263..3ddfbb5d3ab6 100755 --- a/components/ILIAS/Awareness/service.xml +++ b/components/ILIAS/Awareness/service.xml @@ -10,5 +10,4 @@ adm - diff --git a/components/ILIAS/BackgroundTasks_/service.xml b/components/ILIAS/BackgroundTasks_/service.xml index 060904e8178a..c6bb4634e427 100755 --- a/components/ILIAS/BackgroundTasks_/service.xml +++ b/components/ILIAS/BackgroundTasks_/service.xml @@ -7,6 +7,4 @@ - - diff --git a/components/ILIAS/Benchmark/service.xml b/components/ILIAS/Benchmark/service.xml index 6f43aad08c86..176e5f8eae83 100644 --- a/components/ILIAS/Benchmark/service.xml +++ b/components/ILIAS/Benchmark/service.xml @@ -7,5 +7,4 @@ adm - diff --git a/components/ILIAS/BookingManager/module.xml b/components/ILIAS/BookingManager/module.xml index a981b186622d..cee786c2c006 100755 --- a/components/ILIAS/BookingManager/module.xml +++ b/components/ILIAS/BookingManager/module.xml @@ -26,5 +26,4 @@ - diff --git a/components/ILIAS/COPage/service.xml b/components/ILIAS/COPage/service.xml index 66bb1ff5466d..bdff7f410e77 100755 --- a/components/ILIAS/COPage/service.xml +++ b/components/ILIAS/COPage/service.xml @@ -37,7 +37,6 @@ - diff --git a/components/ILIAS/Calendar/service.xml b/components/ILIAS/Calendar/service.xml index cdb7cda6246a..1e17ffa90d7f 100755 --- a/components/ILIAS/Calendar/service.xml +++ b/components/ILIAS/Calendar/service.xml @@ -9,7 +9,7 @@ adm - + @@ -24,5 +24,4 @@ - diff --git a/components/ILIAS/Category/module.xml b/components/ILIAS/Category/module.xml index efeb6da7df3c..36204ab78e6b 100755 --- a/components/ILIAS/Category/module.xml +++ b/components/ILIAS/Category/module.xml @@ -15,8 +15,7 @@ root - + - diff --git a/components/ILIAS/Certificate/service.xml b/components/ILIAS/Certificate/service.xml index 430437ec71d9..0037edb25311 100755 --- a/components/ILIAS/Certificate/service.xml +++ b/components/ILIAS/Certificate/service.xml @@ -17,5 +17,4 @@ - diff --git a/components/ILIAS/Chatroom/module.xml b/components/ILIAS/Chatroom/module.xml index 54b2f086973f..811bcba44b00 100755 --- a/components/ILIAS/Chatroom/module.xml +++ b/components/ILIAS/Chatroom/module.xml @@ -22,7 +22,6 @@ - diff --git a/components/ILIAS/CmiXapi/module.xml b/components/ILIAS/CmiXapi/module.xml index 2406a25b12b2..970ea5d4ae06 100755 --- a/components/ILIAS/CmiXapi/module.xml +++ b/components/ILIAS/CmiXapi/module.xml @@ -37,7 +37,6 @@ - diff --git a/components/ILIAS/Contact/service.xml b/components/ILIAS/Contact/service.xml index 66957c37105b..5e8603e99812 100755 --- a/components/ILIAS/Contact/service.xml +++ b/components/ILIAS/Contact/service.xml @@ -14,5 +14,4 @@ - diff --git a/components/ILIAS/Container/service.xml b/components/ILIAS/Container/service.xml index afb218fae3ae..63d1a62ae06d 100755 --- a/components/ILIAS/Container/service.xml +++ b/components/ILIAS/Container/service.xml @@ -5,7 +5,6 @@ - diff --git a/components/ILIAS/Course/module.xml b/components/ILIAS/Course/module.xml index 7fe09d795344..d1a517e827b7 100755 --- a/components/ILIAS/Course/module.xml +++ b/components/ILIAS/Course/module.xml @@ -51,6 +51,5 @@ - diff --git a/components/ILIAS/CourseReference/module.xml b/components/ILIAS/CourseReference/module.xml index 4d21c021962a..c0bbbf59c0db 100755 --- a/components/ILIAS/CourseReference/module.xml +++ b/components/ILIAS/CourseReference/module.xml @@ -17,5 +17,4 @@ - diff --git a/components/ILIAS/Cron/service.xml b/components/ILIAS/Cron/service.xml index 6e0be1e88bde..2e1c19cb360d 100755 --- a/components/ILIAS/Cron/service.xml +++ b/components/ILIAS/Cron/service.xml @@ -12,5 +12,4 @@ - diff --git a/components/ILIAS/DataProtection/service.xml b/components/ILIAS/DataProtection/service.xml index 0e750c6e2548..793f9989eac2 100755 --- a/components/ILIAS/DataProtection/service.xml +++ b/components/ILIAS/DataProtection/service.xml @@ -7,5 +7,4 @@ adm - diff --git a/components/ILIAS/Database/service.xml b/components/ILIAS/Database/service.xml index 7f2e828d003a..4e7d1cb41347 100755 --- a/components/ILIAS/Database/service.xml +++ b/components/ILIAS/Database/service.xml @@ -1,4 +1,3 @@ - - + diff --git a/components/ILIAS/DidacticTemplate/service.xml b/components/ILIAS/DidacticTemplate/service.xml index adec76fe2199..9cd464d34a8f 100755 --- a/components/ILIAS/DidacticTemplate/service.xml +++ b/components/ILIAS/DidacticTemplate/service.xml @@ -6,5 +6,4 @@ adm - diff --git a/components/ILIAS/EventHandling/service.xml b/components/ILIAS/EventHandling/service.xml index 2437797dff42..bd6b6202fd18 100755 --- a/components/ILIAS/EventHandling/service.xml +++ b/components/ILIAS/EventHandling/service.xml @@ -8,7 +8,6 @@ - diff --git a/components/ILIAS/Exercise/module.xml b/components/ILIAS/Exercise/module.xml index 773bfebe1233..fbaff9890708 100755 --- a/components/ILIAS/Exercise/module.xml +++ b/components/ILIAS/Exercise/module.xml @@ -34,15 +34,14 @@ - + - + - diff --git a/components/ILIAS/Export/service.xml b/components/ILIAS/Export/service.xml index 4e8063fa5b7d..c85a0ea5555c 100755 --- a/components/ILIAS/Export/service.xml +++ b/components/ILIAS/Export/service.xml @@ -1,5 +1,4 @@ - - \ No newline at end of file + diff --git a/components/ILIAS/File/module.xml b/components/ILIAS/File/module.xml index 7c2a801d66c5..a4bdeb1541a0 100755 --- a/components/ILIAS/File/module.xml +++ b/components/ILIAS/File/module.xml @@ -24,7 +24,6 @@ adm - diff --git a/components/ILIAS/FileServices/service.xml b/components/ILIAS/FileServices/service.xml index 5b708ba1a556..d7656bdb5bc9 100755 --- a/components/ILIAS/FileServices/service.xml +++ b/components/ILIAS/FileServices/service.xml @@ -1,7 +1,6 @@ - adm diff --git a/components/ILIAS/Forum/module.xml b/components/ILIAS/Forum/module.xml index ad0e3726f968..5ba7bc31914a 100755 --- a/components/ILIAS/Forum/module.xml +++ b/components/ILIAS/Forum/module.xml @@ -18,7 +18,7 @@ adm - + @@ -32,10 +32,9 @@ - + - diff --git a/components/ILIAS/GlobalScreen/service.xml b/components/ILIAS/GlobalScreen/service.xml index bc16068be22a..79cf4a808b4f 100755 --- a/components/ILIAS/GlobalScreen/service.xml +++ b/components/ILIAS/GlobalScreen/service.xml @@ -8,5 +8,4 @@ adm - diff --git a/components/ILIAS/Glossary/module.xml b/components/ILIAS/Glossary/module.xml index 5f863a326d70..a98e7b52cb13 100755 --- a/components/ILIAS/Glossary/module.xml +++ b/components/ILIAS/Glossary/module.xml @@ -23,7 +23,6 @@ - diff --git a/components/ILIAS/Group/module.xml b/components/ILIAS/Group/module.xml index 72bc6fdab229..86f3a9774ba5 100755 --- a/components/ILIAS/Group/module.xml +++ b/components/ILIAS/Group/module.xml @@ -23,7 +23,7 @@ adm - + @@ -33,5 +33,4 @@ - diff --git a/components/ILIAS/ILIASObject/service.xml b/components/ILIAS/ILIASObject/service.xml index 6496253502a3..44b29519d4ba 100755 --- a/components/ILIAS/ILIASObject/service.xml +++ b/components/ILIAS/ILIASObject/service.xml @@ -17,7 +17,6 @@ - diff --git a/components/ILIAS/Init/service.xml b/components/ILIAS/Init/service.xml index 8274f30dd083..558753611a36 100755 --- a/components/ILIAS/Init/service.xml +++ b/components/ILIAS/Init/service.xml @@ -4,5 +4,4 @@ - diff --git a/components/ILIAS/LTIConsumer/module.xml b/components/ILIAS/LTIConsumer/module.xml index b2e0f2410a9b..cd33aa635d6c 100755 --- a/components/ILIAS/LTIConsumer/module.xml +++ b/components/ILIAS/LTIConsumer/module.xml @@ -25,5 +25,4 @@ - diff --git a/components/ILIAS/LTIProvider/service.xml b/components/ILIAS/LTIProvider/service.xml index 0d2564f42fa7..bc4a22e4d951 100644 --- a/components/ILIAS/LTIProvider/service.xml +++ b/components/ILIAS/LTIProvider/service.xml @@ -16,5 +16,4 @@ - diff --git a/components/ILIAS/Language/service.xml b/components/ILIAS/Language/service.xml index 4356d548f414..001b75c7b475 100755 --- a/components/ILIAS/Language/service.xml +++ b/components/ILIAS/Language/service.xml @@ -13,5 +13,4 @@ checkbox="1" translate="0" rbac="0"> - diff --git a/components/ILIAS/LearningHistory/service.xml b/components/ILIAS/LearningHistory/service.xml index 3914cbe81677..28a49c96b899 100755 --- a/components/ILIAS/LearningHistory/service.xml +++ b/components/ILIAS/LearningHistory/service.xml @@ -1,6 +1,5 @@ - @@ -8,4 +7,4 @@ checkbox="0" inherit="0" translate="sys" rbac="1" system="1" administration="1"> adm - \ No newline at end of file + diff --git a/components/ILIAS/LearningModule/module.xml b/components/ILIAS/LearningModule/module.xml index d456fd2a007a..73db58f55b79 100755 --- a/components/ILIAS/LearningModule/module.xml +++ b/components/ILIAS/LearningModule/module.xml @@ -30,5 +30,4 @@ - diff --git a/components/ILIAS/LegalDocuments/service.xml b/components/ILIAS/LegalDocuments/service.xml index f60e1d718bb8..076480123672 100755 --- a/components/ILIAS/LegalDocuments/service.xml +++ b/components/ILIAS/LegalDocuments/service.xml @@ -3,5 +3,4 @@ - diff --git a/components/ILIAS/Logging/service.xml b/components/ILIAS/Logging/service.xml index 13cdbbe73f12..06b8ca926765 100755 --- a/components/ILIAS/Logging/service.xml +++ b/components/ILIAS/Logging/service.xml @@ -12,5 +12,4 @@ - diff --git a/components/ILIAS/Mail/service.xml b/components/ILIAS/Mail/service.xml index 11b9fefc636d..a4da26dede02 100755 --- a/components/ILIAS/Mail/service.xml +++ b/components/ILIAS/Mail/service.xml @@ -23,5 +23,4 @@ - diff --git a/components/ILIAS/MainMenu/service.xml b/components/ILIAS/MainMenu/service.xml index 56501ef8f720..9f8b3eb638fc 100755 --- a/components/ILIAS/MainMenu/service.xml +++ b/components/ILIAS/MainMenu/service.xml @@ -1,7 +1,6 @@ - adm diff --git a/components/ILIAS/Maps/service.xml b/components/ILIAS/Maps/service.xml index 67e46a69839b..1d56a075373a 100644 --- a/components/ILIAS/Maps/service.xml +++ b/components/ILIAS/Maps/service.xml @@ -7,5 +7,4 @@ adm - diff --git a/components/ILIAS/MediaCast/module.xml b/components/ILIAS/MediaCast/module.xml index bc34ea2e1a44..c0fb3cf5b523 100755 --- a/components/ILIAS/MediaCast/module.xml +++ b/components/ILIAS/MediaCast/module.xml @@ -19,5 +19,4 @@ adm - diff --git a/components/ILIAS/MediaObjects/service.xml b/components/ILIAS/MediaObjects/service.xml index 6839df52b990..5bf8ffce18ce 100755 --- a/components/ILIAS/MediaObjects/service.xml +++ b/components/ILIAS/MediaObjects/service.xml @@ -13,5 +13,4 @@ - diff --git a/components/ILIAS/MediaPool/module.xml b/components/ILIAS/MediaPool/module.xml index 3ba0401765ce..6c7099e4236b 100755 --- a/components/ILIAS/MediaPool/module.xml +++ b/components/ILIAS/MediaPool/module.xml @@ -17,11 +17,10 @@ - + - diff --git a/components/ILIAS/Membership/service.xml b/components/ILIAS/Membership/service.xml index d3cd9895e2e3..e1a9ff663499 100755 --- a/components/ILIAS/Membership/service.xml +++ b/components/ILIAS/Membership/service.xml @@ -7,5 +7,4 @@ - diff --git a/components/ILIAS/MetaData/service.xml b/components/ILIAS/MetaData/service.xml index 47cd91d29cc2..1721df775608 100755 --- a/components/ILIAS/MetaData/service.xml +++ b/components/ILIAS/MetaData/service.xml @@ -12,5 +12,4 @@ - diff --git a/components/ILIAS/News/service.xml b/components/ILIAS/News/service.xml index 60c50ae4bb10..9184e75f5ff7 100755 --- a/components/ILIAS/News/service.xml +++ b/components/ILIAS/News/service.xml @@ -9,9 +9,8 @@ adm - + - diff --git a/components/ILIAS/Notes/service.xml b/components/ILIAS/Notes/service.xml index 89e3afea477f..21c1c1264fe1 100755 --- a/components/ILIAS/Notes/service.xml +++ b/components/ILIAS/Notes/service.xml @@ -10,5 +10,4 @@ adm - diff --git a/components/ILIAS/Notification/service.xml b/components/ILIAS/Notification/service.xml index 6a61bdae53da..159d415bd1ca 100755 --- a/components/ILIAS/Notification/service.xml +++ b/components/ILIAS/Notification/service.xml @@ -3,5 +3,4 @@ - diff --git a/components/ILIAS/Notifications/service.xml b/components/ILIAS/Notifications/service.xml index f06a28589127..bde473d906d6 100755 --- a/components/ILIAS/Notifications/service.xml +++ b/components/ILIAS/Notifications/service.xml @@ -9,7 +9,6 @@ adm - diff --git a/components/ILIAS/OnScreenChat/service.xml b/components/ILIAS/OnScreenChat/service.xml index 0bc2959de8a6..3f09ff2e17b8 100755 --- a/components/ILIAS/OnScreenChat/service.xml +++ b/components/ILIAS/OnScreenChat/service.xml @@ -6,5 +6,4 @@ - - \ No newline at end of file + diff --git a/components/ILIAS/PersonalWorkspace/service.xml b/components/ILIAS/PersonalWorkspace/service.xml index 2a765015e08c..ad3e42f540ae 100755 --- a/components/ILIAS/PersonalWorkspace/service.xml +++ b/components/ILIAS/PersonalWorkspace/service.xml @@ -8,5 +8,4 @@ checkbox="0" inherit="0" translate="sys" rbac="1" system="1" administration="1"> adm - diff --git a/components/ILIAS/Repository/service.xml b/components/ILIAS/Repository/service.xml index 4d64e1da561d..f5332e986afc 100755 --- a/components/ILIAS/Repository/service.xml +++ b/components/ILIAS/Repository/service.xml @@ -14,7 +14,6 @@ - diff --git a/components/ILIAS/ResourceStorage/service.xml b/components/ILIAS/ResourceStorage/service.xml index b2f9e4feaff5..24e8eec3a4dd 100755 --- a/components/ILIAS/ResourceStorage/service.xml +++ b/components/ILIAS/ResourceStorage/service.xml @@ -3,5 +3,4 @@ - diff --git a/components/ILIAS/Scorm2004/module.xml b/components/ILIAS/Scorm2004/module.xml index c9caeec9c980..af8e9da5fa36 100755 --- a/components/ILIAS/Scorm2004/module.xml +++ b/components/ILIAS/Scorm2004/module.xml @@ -4,5 +4,4 @@ - diff --git a/components/ILIAS/Search/service.xml b/components/ILIAS/Search/service.xml index 33b83feb08f6..cadc5fb915c9 100755 --- a/components/ILIAS/Search/service.xml +++ b/components/ILIAS/Search/service.xml @@ -17,5 +17,4 @@ - diff --git a/components/ILIAS/Session/module.xml b/components/ILIAS/Session/module.xml index 5b4bb3678e75..195d165c70f3 100755 --- a/components/ILIAS/Session/module.xml +++ b/components/ILIAS/Session/module.xml @@ -26,5 +26,4 @@ - diff --git a/components/ILIAS/Skill/service.xml b/components/ILIAS/Skill/service.xml index 8379fd2e1879..8bd9b12ad700 100755 --- a/components/ILIAS/Skill/service.xml +++ b/components/ILIAS/Skill/service.xml @@ -13,7 +13,6 @@ skmg - diff --git a/components/ILIAS/Style/service.xml b/components/ILIAS/Style/service.xml index a9988119d50c..0878ff9384c6 100755 --- a/components/ILIAS/Style/service.xml +++ b/components/ILIAS/Style/service.xml @@ -13,7 +13,6 @@ adm - diff --git a/components/ILIAS/Survey/module.xml b/components/ILIAS/Survey/module.xml index ef12edb39b7d..1967f81d8775 100755 --- a/components/ILIAS/Survey/module.xml +++ b/components/ILIAS/Survey/module.xml @@ -28,7 +28,6 @@ - diff --git a/components/ILIAS/SurveyQuestionPool/module.xml b/components/ILIAS/SurveyQuestionPool/module.xml index 19af1fade636..cb0d4ff5fd53 100755 --- a/components/ILIAS/SurveyQuestionPool/module.xml +++ b/components/ILIAS/SurveyQuestionPool/module.xml @@ -15,5 +15,4 @@ root - diff --git a/components/ILIAS/SystemCheck/service.xml b/components/ILIAS/SystemCheck/service.xml index 4bac44be71ff..c9ca1d52cafb 100755 --- a/components/ILIAS/SystemCheck/service.xml +++ b/components/ILIAS/SystemCheck/service.xml @@ -7,8 +7,7 @@ adm - + - diff --git a/components/ILIAS/TermsOfService/service.xml b/components/ILIAS/TermsOfService/service.xml index f65f8f40f29a..b49dc3d25ef6 100755 --- a/components/ILIAS/TermsOfService/service.xml +++ b/components/ILIAS/TermsOfService/service.xml @@ -11,5 +11,4 @@ - diff --git a/components/ILIAS/Tracking/service.xml b/components/ILIAS/Tracking/service.xml index af13202ac075..cfc84025d1ea 100755 --- a/components/ILIAS/Tracking/service.xml +++ b/components/ILIAS/Tracking/service.xml @@ -9,8 +9,8 @@ adm - - + + @@ -20,5 +20,4 @@ - diff --git a/components/ILIAS/Tree/service.xml b/components/ILIAS/Tree/service.xml index 498213d23727..80a7a3771c43 100755 --- a/components/ILIAS/Tree/service.xml +++ b/components/ILIAS/Tree/service.xml @@ -8,9 +8,8 @@ - + - diff --git a/components/ILIAS/User/service.xml b/components/ILIAS/User/service.xml index cc986ad2e74c..9067985c7b64 100755 --- a/components/ILIAS/User/service.xml +++ b/components/ILIAS/User/service.xml @@ -28,6 +28,5 @@ - diff --git a/components/ILIAS/WOPI/service.xml b/components/ILIAS/WOPI/service.xml index 8e4540c995cf..3ef74a8af7f5 100755 --- a/components/ILIAS/WOPI/service.xml +++ b/components/ILIAS/WOPI/service.xml @@ -3,5 +3,4 @@ - diff --git a/components/ILIAS/WebDAV/service.xml b/components/ILIAS/WebDAV/service.xml index 2fe49554a1bc..27751c939ce7 100755 --- a/components/ILIAS/WebDAV/service.xml +++ b/components/ILIAS/WebDAV/service.xml @@ -1,7 +1,6 @@ - diff --git a/components/ILIAS/WebResource/module.xml b/components/ILIAS/WebResource/module.xml index 329c68824caf..95deb255aa9b 100755 --- a/components/ILIAS/WebResource/module.xml +++ b/components/ILIAS/WebResource/module.xml @@ -22,5 +22,4 @@ adm - diff --git a/components/ILIAS/WebServices/service.xml b/components/ILIAS/WebServices/service.xml index 6196f8e25a90..b9cbe686c2bb 100755 --- a/components/ILIAS/WebServices/service.xml +++ b/components/ILIAS/WebServices/service.xml @@ -8,7 +8,7 @@ adm - + @@ -21,5 +21,4 @@ - diff --git a/components/ILIAS/Wiki/module.xml b/components/ILIAS/Wiki/module.xml index 8fcf71d83589..24cddd8fd101 100755 --- a/components/ILIAS/Wiki/module.xml +++ b/components/ILIAS/Wiki/module.xml @@ -27,5 +27,4 @@ - From 954743741f4d4b3884f5e71c49a81b48e290a0e6 Mon Sep 17 00:00:00 2001 From: Tim Schmitz Date: Mon, 3 Aug 2026 10:11:49 +0200 Subject: [PATCH 3/4] replace usages of ilLogger::write and writeLanguageLog --- .../classes/class.ilAdvancedMDValues.php | 4 +- .../class.ilShibbolethRoleAssignmentRules.php | 10 +- .../classes/class.ilPageQuestionProcessor.php | 8 +- .../classes/iCal/class.ilICalParser.php | 2 +- .../Export/class.ilCategoryExporter.php | 2 +- .../Export/class.ilCategoryImporter.php | 2 +- .../classes/class.ilCmiXapiDataSet.php | 2 +- .../Objects/class.ilContainerStartObjects.php | 8 +- .../Container/classes/class.ilContainer.php | 2 +- .../classes/class.ilContainerGUI.php | 13 ++- ...s.ilContainerReferenceAppEventListener.php | 6 +- .../class.ilCourseObjectivesGUI.php | 2 +- .../class.ilLOTestQuestionAdapter.php | 2 +- .../classes/class.ilCourseXMLParser.php | 4 +- .../classes/class.ilFSStorageCourse.php | 2 +- .../Content/class.ilDclContentExporter.php | 2 +- .../Fields/Base/class.ilDclStandardField.php | 4 +- .../File/classes/class.ilFileXMLParser.php | 2 +- .../Folder/classes/class.ilFolderExporter.php | 2 +- .../Folder/classes/class.ilFolderImporter.php | 2 +- .../classes/class.ilFolderXmlParser.php | 2 +- .../ILIAS/Forum/classes/class.ilObjForum.php | 4 +- .../Export/class.ilGlossaryImporter.php | 2 +- .../ILIASObject/classes/class.ilObject.php | 28 +++--- .../classes/class.ilObjectActivation.php | 10 +- .../Init/classes/class.ilErrorHandling.php | 10 +- .../Init/classes/class.ilInitialisation.php | 2 +- .../classes/class.ilItemGroupItems.php | 8 +- .../classes/class.ilObjItemGroup.php | 10 +- .../classes/class.ilLDAPRoleGroupMapping.php | 16 +-- .../classes/Setup/class.ilSetupLanguage.php | 2 +- .../classes/class.ilLMObject.php | 6 +- .../classes/class.ilObjLearningSequence.php | 8 +- .../ILIAS/Logging/classes/NullLogger.php | 8 -- .../ILIAS/Logging/classes/class.ilLogger.php | 22 ----- .../classes/class.ilObjMediaCastGUI.php | 2 +- .../classes/class.ilDBUpdateNewObjectType.php | 4 +- .../LocalUser/class.ilLocalUserGUI.php | 2 +- .../class.ilOrgUnitSimpleImport.php | 2 +- .../class.ilOrgUnitSimpleImportGUI.php | 2 +- .../class.ilOrgUnitSimpleUserImportGUI.php | 2 +- .../Deletion/EventStandardAdapter.php | 2 +- .../TreeValidator/class.ilValidator.php | 98 ++++--------------- .../class.ilObjSCORM2004LearningModule.php | 4 +- .../classes/class.ilSCORM2004StoreData.php | 2 +- .../SCORM/class.ilObjSCORMTracking.php | 6 +- .../classes/SCORM/class.ilSCORMItem.php | 2 +- .../classes/class.ilObjSAHSLearningModule.php | 4 +- .../classes/class.ilScormAiccDataSet.php | 4 +- .../Skill/Node/class.SkillTreeNodeManager.php | 4 +- .../classes/Mail/class.ilPRGMail.php | 8 +- ...lPrgInvalidateExpiredProgressesCronJob.php | 2 +- .../class.ilPrgRestartAssignmentsCronJob.php | 2 +- .../class.ilPrgUserNotRestartedCronJob.php | 2 +- .../class.ilPrgUserRiskyToFailCronJob.php | 2 +- .../classes/memberexport/ilFSStoragePRG.php | 2 +- .../Survey/Export/class.ilSurveyExporter.php | 2 +- .../Survey/Export/class.ilSurveyImporter.php | 6 +- .../class.ilSurveyParticipantsGUI.php | 4 +- .../class.ilSurveyQuestionPoolImporter.php | 2 +- .../classes/class.assImagemapQuestion.php | 2 +- .../classes/class.ilQuestionPageParser.php | 2 +- .../class.ilTestQuestionPoolExporter.php | 2 +- .../class.ilTestQuestionPoolImporter.php | 8 +- .../import/qti12/class.assClozeTestImport.php | 2 +- .../import/qti12/class.assErrorTextImport.php | 2 +- .../qti12/class.assFileUploadImport.php | 2 +- .../qti12/class.assImagemapQuestionImport.php | 2 +- .../qti12/class.assKprimChoiceImport.php | 2 +- .../import/qti12/class.assLongMenuImport.php | 2 +- .../qti12/class.assMatchingQuestionImport.php | 2 +- .../qti12/class.assMultipleChoiceImport.php | 2 +- .../import/qti12/class.assNumericImport.php | 2 +- .../class.assOrderingHorizontalImport.php | 2 +- .../qti12/class.assOrderingQuestionImport.php | 2 +- .../qti12/class.assSingleChoiceImport.php | 2 +- .../qti12/class.assTextQuestionImport.php | 2 +- .../qti12/class.assTextSubsetImport.php | 2 +- ...class.ilCronDeleteInactiveUserAccounts.php | 2 +- .../Cron/class.ilUserCronCheckAccounts.php | 2 +- .../ILIAS/Utilities/classes/class.ilUtil.php | 4 +- .../classes/class.ilVirusScanner.php | 4 +- .../classes/class.ilVirusScannerClamAV.php | 2 +- .../classes/class.ilVirusScannerSophos.php | 2 +- components/ILIAS/WebDAV/src/Log/Log.php | 4 +- .../classes/class.ilECSCategoryMapping.php | 8 +- .../class.ilSoapCourseAdministration.php | 2 +- .../class.ilSoapFileAdministration.php | 3 +- ...s.ilSoapLearningProgressAdministration.php | 8 +- .../class.ilSoapObjectAdministration.php | 16 +-- .../class.ilSoapUserAdministration.php | 20 ++-- 91 files changed, 212 insertions(+), 298 deletions(-) diff --git a/components/ILIAS/AdvancedMetaData/classes/class.ilAdvancedMDValues.php b/components/ILIAS/AdvancedMetaData/classes/class.ilAdvancedMDValues.php index cf42dccb054a..35a2dd37a08b 100755 --- a/components/ILIAS/AdvancedMetaData/classes/class.ilAdvancedMDValues.php +++ b/components/ILIAS/AdvancedMetaData/classes/class.ilAdvancedMDValues.php @@ -426,9 +426,9 @@ public static function _cloneValues( } if (!$has_cloned) { - $ilLog->write(__METHOD__ . ': No advanced meta data found.'); + $ilLog->info('No advanced meta data found.'); } else { - $ilLog->write(__METHOD__ . ': Start cloning advanced meta data.'); + $ilLog->info('Start cloning advanced meta data.'); } } diff --git a/components/ILIAS/AuthShibboleth/classes/class.ilShibbolethRoleAssignmentRules.php b/components/ILIAS/AuthShibboleth/classes/class.ilShibbolethRoleAssignmentRules.php index 549617bcb320..77d9e5a07767 100755 --- a/components/ILIAS/AuthShibboleth/classes/class.ilShibbolethRoleAssignmentRules.php +++ b/components/ILIAS/AuthShibboleth/classes/class.ilShibbolethRoleAssignmentRules.php @@ -71,11 +71,11 @@ public static function updateAssignments(int $a_usr_id, array $a_data): bool $rule = new ilShibbolethRoleAssignmentRule($row->rule_id); // $matches = $rule->matches($a_data); if ($row->add_on_update && $rule->doesMatch($a_data)) { - $logger->write(__METHOD__ . ': Assigned to role ' . ilObject::_lookupTitle($rule->getRoleId())); + $logger->info('Assigned to role ' . ilObject::_lookupTitle($rule->getRoleId())); $rbac_admin->assignUser($rule->getRoleId(), $a_usr_id); } if ($row->remove_on_update && !$rule->doesMatch($a_data)) { - $logger->write(__METHOD__ . ': Deassigned from role ' . ilObject::_lookupTitle($rule->getRoleId())); + $logger->info('Deassigned from role ' . ilObject::_lookupTitle($rule->getRoleId())); $rbac_admin->deassignUser($rule->getRoleId(), $a_usr_id); } } @@ -83,7 +83,7 @@ public static function updateAssignments(int $a_usr_id, array $a_data): bool if (!array_intersect($rbac_review->assignedRoles($a_usr_id), $rbac_review->getGlobalRoles())) { $settings = new ilShibbolethSettings(); $default_role = $settings->getDefaultRole(); - $logger->write(__METHOD__ . ': Assigned to default role ' . ilObject::_lookupTitle($default_role)); + $logger->info('Assigned to default role ' . ilObject::_lookupTitle($default_role)); $rbac_admin->assignUser($default_role, $a_usr_id); } @@ -103,7 +103,7 @@ public static function doAssignments(int $a_usr_id, array $a_data): bool $rule = new ilShibbolethRoleAssignmentRule($row->rule_id); if ($rule->doesMatch($a_data)) { $num_matches++; - $logger->write(__METHOD__ . ': Assigned to role ' . ilObject::_lookupTitle($rule->getRoleId())); + $logger->info(__METHOD__ . ': Assigned to role ' . ilObject::_lookupTitle($rule->getRoleId())); $rbac_admin->assignUser($rule->getRoleId(), $a_usr_id); } } @@ -111,7 +111,7 @@ public static function doAssignments(int $a_usr_id, array $a_data): bool if ($num_matches === 0) { $settings = new ilShibbolethSettings(); $default_role = $settings->getDefaultRole(); - $logger->write(__METHOD__ . ': Assigned to default role ' . ilObject::_lookupTitle($default_role)); + $logger->info(__METHOD__ . ': Assigned to default role ' . ilObject::_lookupTitle($default_role)); $rbac_admin->assignUser($default_role, $a_usr_id); } diff --git a/components/ILIAS/COPage/classes/class.ilPageQuestionProcessor.php b/components/ILIAS/COPage/classes/class.ilPageQuestionProcessor.php index 043cfbb916de..51e9158b32bc 100755 --- a/components/ILIAS/COPage/classes/class.ilPageQuestionProcessor.php +++ b/components/ILIAS/COPage/classes/class.ilPageQuestionProcessor.php @@ -37,14 +37,14 @@ public static function saveQuestionAnswer( $ilUser = $DIC->user(); $ilLog = $DIC["ilLog"]; $ilDB = $DIC->database(); - $ilLog->write($a_type); - $ilLog->write($a_id); - $ilLog->write($a_answer); + $ilLog->info($a_type); + $ilLog->info($a_id); + $ilLog->info($a_answer); $answer = json_decode($a_answer, false, 512, JSON_THROW_ON_ERROR); $passed = $answer->passed; $choice = $answer->choice ?? []; $points = self::calculatePoints($a_type, $a_id, $choice); - $ilLog->write("Points: " . $points); + $ilLog->info("Points: " . $points); $set = $ilDB->query( "SELECT * FROM page_qst_answer WHERE " . diff --git a/components/ILIAS/Calendar/classes/iCal/class.ilICalParser.php b/components/ILIAS/Calendar/classes/iCal/class.ilICalParser.php index 4d29641e17e8..2a6243f072bb 100755 --- a/components/ILIAS/Calendar/classes/iCal/class.ilICalParser.php +++ b/components/ILIAS/Calendar/classes/iCal/class.ilICalParser.php @@ -205,7 +205,7 @@ protected function storeItems(string $a_param_part, string $a_value_part): void // Return if there are no values if (!count($items)) { - $this->log->write(__METHOD__ . ': Cannot parse parameter: ' . $a_param_part . ', value: ' . $a_value_part); + $this->log->info('Cannot parse parameter: ' . $a_param_part . ', value: ' . $a_value_part); return; } diff --git a/components/ILIAS/Category/Export/class.ilCategoryExporter.php b/components/ILIAS/Category/Export/class.ilCategoryExporter.php index ece67162fc54..fbb7b3a919d8 100755 --- a/components/ILIAS/Category/Export/class.ilCategoryExporter.php +++ b/components/ILIAS/Category/Export/class.ilCategoryExporter.php @@ -77,7 +77,7 @@ public function getXmlRepresentation(string $a_entity, string $a_schema_version, $category = ilObjectFactory::getInstanceByRefId($cat_ref_id, false); if (!$category instanceof ilObjCategory) { - $GLOBALS['ilLog']->write(__METHOD__ . $a_id . ' is not instance of type category!'); + $GLOBALS['ilLog']->info($a_id . ' is not instance of type category!'); return ''; } diff --git a/components/ILIAS/Category/Export/class.ilCategoryImporter.php b/components/ILIAS/Category/Export/class.ilCategoryImporter.php index 5fe76b7a0a6e..1092206ba0e8 100755 --- a/components/ILIAS/Category/Export/class.ilCategoryImporter.php +++ b/components/ILIAS/Category/Export/class.ilCategoryImporter.php @@ -60,7 +60,7 @@ public function importXmlRepresentation( $parser->startParsing(); $a_mapping->addMapping('components/ILIAS/Category', 'cat', $a_id, (string) $this->category->getId()); } catch (ilSaxParserException | Exception $e) { - $GLOBALS['ilLog']->write(__METHOD__ . ': Parsing failed with message, "' . $e->getMessage() . '".'); + $GLOBALS['ilLog']->info('Parsing failed with message, "' . $e->getMessage() . '".'); } foreach ($a_mapping->getMappingsOfEntity('components/ILIAS/Container', 'objs') as $old => $new) { diff --git a/components/ILIAS/CmiXapi/classes/class.ilCmiXapiDataSet.php b/components/ILIAS/CmiXapi/classes/class.ilCmiXapiDataSet.php index 8d20a98cedce..c7d7bc36eb1d 100755 --- a/components/ILIAS/CmiXapi/classes/class.ilCmiXapiDataSet.php +++ b/components/ILIAS/CmiXapi/classes/class.ilCmiXapiDataSet.php @@ -164,7 +164,7 @@ public function getCmiXapiXmlRepresentation( global $DIC; /** @var \ILIAS\DI\Container $DIC */ - $GLOBALS["ilLog"]->write(json_encode($this->getTypes("cmix", "5.1.0"), JSON_PRETTY_PRINT)); + $GLOBALS["ilLog"]->info(json_encode($this->getTypes("cmix", "5.1.0"), JSON_PRETTY_PRINT)); $this->dircnt = 1; diff --git a/components/ILIAS/Container/StartObjects/Objects/class.ilContainerStartObjects.php b/components/ILIAS/Container/StartObjects/Objects/class.ilContainerStartObjects.php index 1409c28f58f0..4053e8dbe912 100755 --- a/components/ILIAS/Container/StartObjects/Objects/class.ilContainerStartObjects.php +++ b/components/ILIAS/Container/StartObjects/Objects/class.ilContainerStartObjects.php @@ -239,7 +239,7 @@ public function cloneDependencies( $ilObjDataCache = $this->obj_data_cache; $ilLog = $this->log; - $ilLog->write(__METHOD__ . ': Begin course start objects...'); + $ilLog->info('Begin course start objects...'); $new_obj_id = $ilObjDataCache->lookupObjId($a_target_id); $start = new self($a_target_id, $new_obj_id); @@ -249,13 +249,13 @@ public function cloneDependencies( foreach ($this->getStartObjects() as $data) { $item_ref_id = $data['item_ref_id']; if (isset($mappings[$item_ref_id]) && $mappings[$item_ref_id]) { - $ilLog->write(__METHOD__ . ': Clone start object nr. ' . $item_ref_id); + $ilLog->info('Clone start object nr. ' . $item_ref_id); $start->add($mappings[$item_ref_id]); } else { - $ilLog->write(__METHOD__ . ': No mapping found for start object nr. ' . $item_ref_id); + $ilLog->info('No mapping found for start object nr. ' . $item_ref_id); } } - $ilLog->write(__METHOD__ . ': ... end course start objects'); + $ilLog->info('... end course start objects'); } public static function isStartObject( diff --git a/components/ILIAS/Container/classes/class.ilContainer.php b/components/ILIAS/Container/classes/class.ilContainer.php index 358d742f536b..f21b06a47de2 100755 --- a/components/ILIAS/Container/classes/class.ilContainer.php +++ b/components/ILIAS/Container/classes/class.ilContainer.php @@ -554,7 +554,7 @@ public function cloneAllObject( $soap_client->setResponseTimeout($soap_client->getResponseTimeout()); $soap_client->enableWSDL(true); - $ilLog->write(__METHOD__ . ': Trying to call Soap client...'); + $ilLog->info('Trying to call Soap client...'); if ($soap_client->init()) { ilLoggerFactory::getLogger('obj')->info('Calling soap clone method'); $res = $soap_client->call('ilClone', [$new_session_id . '::' . $client_id, $copy_id]); diff --git a/components/ILIAS/Container/classes/class.ilContainerGUI.php b/components/ILIAS/Container/classes/class.ilContainerGUI.php index c586c22e00dd..390512331af8 100755 --- a/components/ILIAS/Container/classes/class.ilContainerGUI.php +++ b/components/ILIAS/Container/classes/class.ilContainerGUI.php @@ -1375,7 +1375,7 @@ public function performPasteIntoMultipleObjectsObject(): void } // log pasteObject call - $ilLog->write(__METHOD__ . ", cmd: " . $command); + $ilLog->info("cmd: " . $command); //////////////////////////////////////////////////////// // everything ok: now paste the objects to new location @@ -1506,7 +1506,7 @@ public function performPasteIntoMultipleObjectsObject(): void // END PATCH ChangeEvent: Record link event. } - $ilLog->write(__METHOD__ . ', link finished'); + $ilLog->info('link finished'); } $links = []; @@ -1710,7 +1710,7 @@ public function pasteObject(): void } // log pasteObject call - $ilLog->write("ilObjectGUI::pasteObject(), cmd: " . $this->clipboard->getCmd()); + $ilLog->info("cmd: " . $this->clipboard->getCmd()); //////////////////////////////////////////////////////// // everything ok: now paste the objects to new location @@ -1735,7 +1735,7 @@ public function pasteObject(): void } $ilCtrl->redirectByClass("ilobjectcopygui", "saveTarget"); - $ilLog->write("ilObjectGUI::pasteObject(), copy finished"); + $ilLog->info("copy finished"); } // END WebDAV: Support a Copy command in the repository @@ -1801,7 +1801,7 @@ public function pasteObject(): void // END PATCH ChangeEvent: Record link event. } - $ilLog->write("ilObjectGUI::pasteObject(), link finished"); + $ilLog->info("link finished"); } // END LINK @@ -1836,8 +1836,7 @@ public function clipboardObject(): void // function should not be called if clipboard is empty if (!$this->clipboard->hasEntries()) { - $message = sprintf('%s::clipboardObject(): Illegal access. Clipboard variable is empty!', get_class($this)); - $ilLog->write($message, $ilLog->FATAL); + $ilLog->fatal('Illegal access. Clipboard variable is empty!'); $ilErr->raiseError($this->lng->txt("permission_denied"), $ilErr->WARNING); } diff --git a/components/ILIAS/ContainerReference/classes/class.ilContainerReferenceAppEventListener.php b/components/ILIAS/ContainerReference/classes/class.ilContainerReferenceAppEventListener.php index 392e4da53c7b..ec196069c18d 100755 --- a/components/ILIAS/ContainerReference/classes/class.ilContainerReferenceAppEventListener.php +++ b/components/ILIAS/ContainerReference/classes/class.ilContainerReferenceAppEventListener.php @@ -38,7 +38,7 @@ public static function handleEvent(string $a_component, string $a_event, array $ case 'components/ILIAS/StudyProgramme': switch ($a_event) { case 'delete': - $ilLog->write(__METHOD__ . ': Handling delete event.'); + $ilLog->info('Handling delete event.'); self::deleteReferences((int) $a_parameter['obj_id']); break; } @@ -69,7 +69,7 @@ public static function deleteReferences(int $a_target_id): void case 'prgr': $parent_id = $tree->getParentId($ref_id); $instance->delete(); - $ilLog->write(__METHOD__ . ': Deleted reference object of type ' . $instance->getType() . ' with Id ' . $instance->getId()); + $ilLog->info('Deleted reference object of type ' . $instance->getType() . ' with Id ' . $instance->getId()); $ilAppEventHandler->raise( 'components/ILIAS/ContainerReference', 'deleteReference', @@ -82,7 +82,7 @@ public static function deleteReferences(int $a_target_id): void break; default: - $ilLog->write(__METHOD__ . ': Unexpected object type ' . $instance->getType() . ' with Id ' . $instance->getId()); + $ilLog->info('Unexpected object type ' . $instance->getType() . ' with Id ' . $instance->getId()); break; } } diff --git a/components/ILIAS/Course/classes/Objectives/class.ilCourseObjectivesGUI.php b/components/ILIAS/Course/classes/Objectives/class.ilCourseObjectivesGUI.php index 11346281eddf..1486a42e17c5 100755 --- a/components/ILIAS/Course/classes/Objectives/class.ilCourseObjectivesGUI.php +++ b/components/ILIAS/Course/classes/Objectives/class.ilCourseObjectivesGUI.php @@ -1044,7 +1044,7 @@ protected function initFormLimits(string $a_mode): ilPropertyFormGUI $limit = 0; foreach ($tests as $test) { - $GLOBALS['DIC']['ilLog']->write(__METHOD__ . ': ' . print_r($test, true)); + $GLOBALS['DIC']['ilLog']->info(print_r($test, true)); $limit = $test['limit']; diff --git a/components/ILIAS/Course/classes/Objectives/class.ilLOTestQuestionAdapter.php b/components/ILIAS/Course/classes/Objectives/class.ilLOTestQuestionAdapter.php index 76756cd127cb..2949aa3e3027 100755 --- a/components/ILIAS/Course/classes/Objectives/class.ilLOTestQuestionAdapter.php +++ b/components/ILIAS/Course/classes/Objectives/class.ilLOTestQuestionAdapter.php @@ -355,7 +355,7 @@ public function updateQuestionResult(ilTestSession $session, assQuestion $qst): { foreach ($this->run as $run) { if ($run->questionExists($qst->getId())) { - $GLOBALS['DIC']['ilLog']->write(__METHOD__ . ': reached points are ' . $qst->getReachedPoints( + $GLOBALS['DIC']['ilLog']->info('reached points are ' . $qst->getReachedPoints( $session->getActiveId(), $session->getPass() )); diff --git a/components/ILIAS/Course/classes/class.ilCourseXMLParser.php b/components/ILIAS/Course/classes/class.ilCourseXMLParser.php index e4801811407b..61c6b250d18a 100755 --- a/components/ILIAS/Course/classes/class.ilCourseXMLParser.php +++ b/components/ILIAS/Course/classes/class.ilCourseXMLParser.php @@ -101,7 +101,7 @@ public function handlerBeginTag($a_xml_parser, string $a_name, array $a_attribs) switch ($a_name) { case 'Course': if (strlen($a_attribs['importId'] ?? '')) { - $this->log->write("CourseXMLParser: importId = " . $a_attribs['importId']); + $this->log->info("importId = " . $a_attribs['importId']); $this->course_obj->setImportId($a_attribs['importId']); ilObject::_writeImportId($this->course_obj->getId(), $a_attribs['importId']); } @@ -482,7 +482,7 @@ public function handlerEndTag($a_xml_parser, string $a_name): void switch ($a_name) { case 'Course': - $this->log->write('CourseXMLParser: import_id = ' . $this->course_obj->getImportId()); + $this->log->info('import_id = ' . $this->course_obj->getImportId()); $this->course_obj->readContainerSettings(); // see #26169 diff --git a/components/ILIAS/Course/classes/class.ilFSStorageCourse.php b/components/ILIAS/Course/classes/class.ilFSStorageCourse.php index f4343438634c..b5cb9d74ac97 100755 --- a/components/ILIAS/Course/classes/class.ilFSStorageCourse.php +++ b/components/ILIAS/Course/classes/class.ilFSStorageCourse.php @@ -77,7 +77,7 @@ public function addMemberExportFile($a_data, $a_rel_name): bool { $this->initMemberExportDirectory(); if (!$this->writeToFile($a_data, $this->getMemberExportDirectory() . '/' . $a_rel_name)) { - $this->logger->write('Cannot write to file: ' . $this->getMemberExportDirectory() . '/' . $a_rel_name); + $this->logger->info('Cannot write to file: ' . $this->getMemberExportDirectory() . '/' . $a_rel_name); return false; } diff --git a/components/ILIAS/DataCollection/classes/Content/class.ilDclContentExporter.php b/components/ILIAS/DataCollection/classes/Content/class.ilDclContentExporter.php index c0307b5ea756..a5fc5c9ea5e7 100755 --- a/components/ILIAS/DataCollection/classes/Content/class.ilDclContentExporter.php +++ b/components/ILIAS/DataCollection/classes/Content/class.ilDclContentExporter.php @@ -172,7 +172,7 @@ public function exportAsync(string $format = self::EXPORT_EXCEL, ?string $filepa $soap_client->setResponseTimeout(5); $soap_client->enableWSDL(true); - $DIC->logger()->root()->write(__METHOD__ . ': Trying to call Soap client...'); + $DIC->logger()->root()->info('Trying to call Soap client...'); array_unshift($soap_params, $new_session_id . '::' . $client_id); diff --git a/components/ILIAS/DataCollection/classes/Fields/Base/class.ilDclStandardField.php b/components/ILIAS/DataCollection/classes/Fields/Base/class.ilDclStandardField.php index 1f2d05c42445..a4f254388252 100755 --- a/components/ILIAS/DataCollection/classes/Fields/Base/class.ilDclStandardField.php +++ b/components/ILIAS/DataCollection/classes/Fields/Base/class.ilDclStandardField.php @@ -35,7 +35,7 @@ public function doRead(): void $ilLog = $DIC['ilLog']; $message = "Standard fields cannot be read from DB"; $this->main_tpl->setOnScreenMessage('failure', $message); - $ilLog->write("[ilDclStandardField] " . $message); + $ilLog->info("[ilDclStandardField] " . $message); } public function doCreate(): void @@ -44,7 +44,7 @@ public function doCreate(): void $ilLog = $DIC['ilLog']; $message = "Standard fields cannot be written to DB"; $this->main_tpl->setOnScreenMessage('failure', $message); - $ilLog->write("[ilDclStandardField] " . $message); + $ilLog->info("[ilDclStandardField] " . $message); } public function doUpdate(): void diff --git a/components/ILIAS/File/classes/class.ilFileXMLParser.php b/components/ILIAS/File/classes/class.ilFileXMLParser.php index 44f6f10df3ad..d9d32049e2cc 100755 --- a/components/ILIAS/File/classes/class.ilFileXMLParser.php +++ b/components/ILIAS/File/classes/class.ilFileXMLParser.php @@ -205,7 +205,7 @@ public function handlerEndTag($a_xml_parser, string $a_name): void { $this->cdata = trim($this->cdata ?? ''); - $GLOBALS['DIC']['ilLog']->write(__METHOD__ . ': ' . $this->cdata); + $GLOBALS['DIC']['ilLog']->info($this->cdata); switch ($a_name) { case 'File': diff --git a/components/ILIAS/Folder/classes/class.ilFolderExporter.php b/components/ILIAS/Folder/classes/class.ilFolderExporter.php index 3af5c595a54a..b734ea7921a0 100755 --- a/components/ILIAS/Folder/classes/class.ilFolderExporter.php +++ b/components/ILIAS/Folder/classes/class.ilFolderExporter.php @@ -49,7 +49,7 @@ public function getXmlRepresentation(string $a_entity, string $a_schema_version, $writer->write(); return $writer->xmlDumpMem(false); } catch (UnexpectedValueException $e) { - $GLOBALS['ilLog']->write("Caught error: " . $e->getMessage()); + $GLOBALS['ilLog']->info("Caught error: " . $e->getMessage()); return ''; } } diff --git a/components/ILIAS/Folder/classes/class.ilFolderImporter.php b/components/ILIAS/Folder/classes/class.ilFolderImporter.php index a3ed72ee70a5..f1c4f0a20c1f 100755 --- a/components/ILIAS/Folder/classes/class.ilFolderImporter.php +++ b/components/ILIAS/Folder/classes/class.ilFolderImporter.php @@ -48,7 +48,7 @@ public function importXmlRepresentation(string $a_entity, string $a_id, string $ $parser->start(); $a_mapping->addMapping('components/ILIAS/Folder', 'fold', $a_id, (string) $this->folder->getId()); } catch (ilSaxParserException $e) { - $GLOBALS['ilLog']->write(__METHOD__ . ': Parsing failed with message, "' . $e->getMessage() . '".'); + $GLOBALS['ilLog']->info(__METHOD__ . ': Parsing failed with message, "' . $e->getMessage() . '".'); } } } diff --git a/components/ILIAS/Folder/classes/class.ilFolderXmlParser.php b/components/ILIAS/Folder/classes/class.ilFolderXmlParser.php index c03cc08ec9e2..a0c3aa993af0 100755 --- a/components/ILIAS/Folder/classes/class.ilFolderXmlParser.php +++ b/components/ILIAS/Folder/classes/class.ilFolderXmlParser.php @@ -92,7 +92,7 @@ public function handlerBeginTag($a_xml_parser, string $a_name, array $a_attribs) */ public function handlerEndTag($a_xml_parser, string $a_name): void { - $GLOBALS['ilLog']->write(__METHOD__ . ': Called ' . $a_name); + $GLOBALS['ilLog']->info(__METHOD__ . ': Called ' . $a_name); switch ($a_name) { case 'Folder': diff --git a/components/ILIAS/Forum/classes/class.ilObjForum.php b/components/ILIAS/Forum/classes/class.ilObjForum.php index e9232c0adf54..a1fbe2de93ca 100755 --- a/components/ILIAS/Forum/classes/class.ilObjForum.php +++ b/components/ILIAS/Forum/classes/class.ilObjForum.php @@ -473,7 +473,7 @@ public function cloneAutoGeneratedRoles(self $new_obj): void 0 === $this->getRefId() || 0 === $new_obj->getRefId() ) { - $this->logger->write(__METHOD__ . ' : Error cloning auto generated role: il_frm_moderator'); + $this->logger->info('Error cloning auto generated role: il_frm_moderator'); } $this->rbac->admin()->copyRolePermissions( @@ -484,7 +484,7 @@ public function cloneAutoGeneratedRoles(self $new_obj): void true ); - $this->logger->write(__METHOD__ . ' : Finished copying of role il_frm_moderator.'); + $this->logger->info('Finished copying of role il_frm_moderator.'); $moderators = new ilForumModerators($this->getRefId()); $src_moderator_usr_ids = $moderators->getCurrentModerators(); diff --git a/components/ILIAS/Glossary/Export/class.ilGlossaryImporter.php b/components/ILIAS/Glossary/Export/class.ilGlossaryImporter.php index ebcbd107be27..218b4dc92a25 100755 --- a/components/ILIAS/Glossary/Export/class.ilGlossaryImporter.php +++ b/components/ILIAS/Glossary/Export/class.ilGlossaryImporter.php @@ -47,7 +47,7 @@ public function importXmlRepresentation( // in the new version (5.1) we are also here, but the following file should not exist // if being exported with 5.1 or higher $xml_file = $this->getImportDirectory() . '/' . basename($this->getImportDirectory()) . '.xml'; - $GLOBALS['ilLog']->write(__METHOD__ . ': Using XML file ' . $xml_file); + $GLOBALS['ilLog']->info('Using XML file ' . $xml_file); // old school import if (file_exists($xml_file)) { diff --git a/components/ILIAS/ILIASObject/classes/class.ilObject.php b/components/ILIAS/ILIASObject/classes/class.ilObject.php index 19c0e04aa194..04127db46795 100755 --- a/components/ILIAS/ILIASObject/classes/class.ilObject.php +++ b/components/ILIAS/ILIASObject/classes/class.ilObject.php @@ -244,7 +244,7 @@ public function read(): void $obj["type"] ); - $this->log->write($message); + $this->log->info($message); throw new ilObjectTypeMismatchException($message); } @@ -558,7 +558,7 @@ public function create(): int $this->error->raiseError($message, $this->error->WARNING); } - $this->log->write("ilObject::create(), start"); + $this->log->info("start"); // determine owner $owner = 0; @@ -620,9 +620,9 @@ public function create(): int $this->setOwner($owner); // write log entry - $this->log->write( + $this->log->info( sprintf( - "ilObject::create(), finished, obj_id: %s, type: %s, title: %s", + "finished, obj_id: %s, type: %s, title: %s", $this->getId(), $this->getType(), $this->getTitle() @@ -1189,7 +1189,7 @@ public function putInTree(int $parent_ref_id): void $this->handleAutoRating(); $log_entry = sprintf( - "ilObject::putInTree(), parent_ref: %s, ref_id: %s, obj_id: %s, type: %s, title: %s", + "parent_ref: %s, ref_id: %s, obj_id: %s, type: %s, title: %s", $parent_ref_id, $this->getRefId(), $this->getId(), @@ -1197,7 +1197,7 @@ public function putInTree(int $parent_ref_id): void $this->getTitle() ); - $this->log->write($log_entry); + $this->log->info($log_entry); $this->app_event_handler->raise( 'components/ILIAS/ILIASObject', @@ -1307,13 +1307,13 @@ public function delete(): bool $type = ilObject::_lookupType($this->getId()); if ($this->type != $type) { $log_entry = sprintf( - "ilObject::delete(): Type mismatch. Object with obj_id: %s was instantiated by type '%s'. DB type is: %s", + "Type mismatch. Object with obj_id: %s was instantiated by type '%s'. DB type is: %s", $this->id, $this->type, $type ); - $this->log->write($log_entry); + $this->log->info($log_entry); $this->error->raiseError( sprintf("ilObject::delete(): Type mismatch. (%s/%s)", $this->type, $this->id), $this->error->WARNING @@ -1336,9 +1336,9 @@ public function delete(): bool ; $this->db->manipulate($sql); - $this->log->write( + $this->log->info( sprintf( - "ilObject::delete(), deleted object, obj_id: %s, type: %s, title: %s", + "deleted object, obj_id: %s, type: %s, title: %s", $this->getId(), $this->getType(), $this->getTitle() @@ -1369,9 +1369,9 @@ public function delete(): bool $remove = true; } else { - $this->log->write( + $this->log->info( sprintf( - "ilObject::delete(), object not deleted, number of references: %s, obj_id: %s, type: %s, title: %s", + "object not deleted, number of references: %s, obj_id: %s, type: %s, title: %s", $this->countReferences(), $this->getId(), $this->getType(), @@ -1392,9 +1392,9 @@ public function delete(): bool ; $this->db->manipulate($sql); - $this->log->write( + $this->log->info( sprintf( - "ilObject::delete(), reference deleted, ref_id: %s, obj_id: %s, type: %s, title: %s", + "reference deleted, ref_id: %s, obj_id: %s, type: %s, title: %s", $this->getRefId(), $this->getId(), $this->getType(), diff --git a/components/ILIAS/ILIASObject/classes/class.ilObjectActivation.php b/components/ILIAS/ILIASObject/classes/class.ilObjectActivation.php index f0da5678968d..46f4096c70e7 100755 --- a/components/ILIAS/ILIASObject/classes/class.ilObjectActivation.php +++ b/components/ILIAS/ILIASObject/classes/class.ilObjectActivation.php @@ -421,17 +421,17 @@ public static function cloneDependencies(int $ref_id, int $target_id, int $copy_ $ilLog = $DIC["ilLog"]; - $ilLog->write(__METHOD__ . ': Begin course items...' . $ref_id); + $ilLog->info('Begin course items...' . $ref_id); $items = self::getItems($ref_id, false); if (!$items) { - $ilLog->write(__METHOD__ . ': No course items found.'); + $ilLog->info('No course items found.'); return; } // new course item object if (!is_object(ilObjectFactory::getInstanceByRefId($target_id, false))) { - $ilLog->write(__METHOD__ . ': Cannot create target object.'); + $ilLog->info('Cannot create target object.'); return; } @@ -440,11 +440,11 @@ public static function cloneDependencies(int $ref_id, int $target_id, int $copy_ foreach ($items as $item) { if (!isset($mappings[$item['parent_id']]) or !$mappings[$item['parent_id']]) { - $ilLog->write(__METHOD__ . ': No mapping for parent nr. ' . $item['parent_id']); + $ilLog->info('No mapping for parent nr. ' . $item['parent_id']); continue; } if (!isset($mappings[$item['obj_id']]) or !$mappings[$item['obj_id']]) { - $ilLog->write(__METHOD__ . ': No mapping for item nr. ' . $item['obj_id']); + $ilLog->info('No mapping for item nr. ' . $item['obj_id']); continue; } $new_item_id = $mappings[$item['obj_id']]; diff --git a/components/ILIAS/Init/classes/class.ilErrorHandling.php b/components/ILIAS/Init/classes/class.ilErrorHandling.php index 7676978ba4c1..89939b13b40a 100755 --- a/components/ILIAS/Init/classes/class.ilErrorHandling.php +++ b/components/ILIAS/Init/classes/class.ilErrorHandling.php @@ -144,13 +144,13 @@ private function errorHandler(string $message, int $code, array $backtrace): voi $m = 'Fatal Error: Called raise error two times.
' . 'First error: ' . $session_failure . '
' . 'Last Error:' . $message; - $log->write($m); + $log->info($m); ilSession::clear('failure'); die($m); } if ($log instanceof ilLogger) { - $log->write($message); + $log->info($message); } if ($code === $this->FATAL) { throw new RuntimeException(stripslashes($message)); @@ -292,7 +292,7 @@ protected function devmodeHandler(): HandlerInterface // fallthrough default: if ((!defined('ERROR_HANDLER') || ERROR_HANDLER !== 'PRETTY_PAGE') && $ilLog) { - $ilLog->write( + $ilLog->info( "Unknown or undefined error handler '" . ERROR_HANDLER . "'. " . 'Falling back to PrettyPageHandler.' ); @@ -401,7 +401,7 @@ public function handlePreWhoops(int $level, string $message, string $file, int $ if ($level >= E_USER_NOTICE) { if ($ilLog) { $severity = Whoops\Util\Misc::translateErrorCode($level); - $ilLog->write("\n\n" . $severity . ' - ' . $message . "\n" . $file . ' - line ' . $line . "\n"); + $ilLog->info("\n\n" . $severity . ' - ' . $message . "\n" . $file . ' - line ' . $line . "\n"); } return true; @@ -411,7 +411,7 @@ public function handlePreWhoops(int $level, string $message, string $file, int $ if ($level === E_USER_DEPRECATED) { if ($ilLog) { $severity = Whoops\Util\Misc::translateErrorCode($level); - $ilLog->write("\n\n" . $severity . ' - ' . $message . "\n" . $file . ' - line ' . $line . "\n"); + $ilLog->info("\n\n" . $severity . ' - ' . $message . "\n" . $file . ' - line ' . $line . "\n"); } return true; diff --git a/components/ILIAS/Init/classes/class.ilInitialisation.php b/components/ILIAS/Init/classes/class.ilInitialisation.php index 14302b56b811..91086a1e0e2e 100755 --- a/components/ILIAS/Init/classes/class.ilInitialisation.php +++ b/components/ILIAS/Init/classes/class.ilInitialisation.php @@ -1112,7 +1112,7 @@ protected static function initGlobal( protected static function abortAndDie(string $a_message): void { if (isset($GLOBALS['ilLog'])) { - $GLOBALS['ilLog']->write("Fatal Error: ilInitialisation - " . $a_message); + $GLOBALS['ilLog']->info("Fatal Error: ilInitialisation - " . $a_message); $GLOBALS['ilLog']->logStack(); } die($a_message); diff --git a/components/ILIAS/ItemGroup/classes/class.ilItemGroupItems.php b/components/ILIAS/ItemGroup/classes/class.ilItemGroupItems.php index 704c693f7461..6698507a2332 100755 --- a/components/ILIAS/ItemGroup/classes/class.ilItemGroupItems.php +++ b/components/ILIAS/ItemGroup/classes/class.ilItemGroupItems.php @@ -194,7 +194,7 @@ public function cloneItems( ): void { $ilLog = $this->log; - $ilLog->write(__METHOD__ . ': Begin cloning item group materials ... -' . $a_source_id . '-'); + $ilLog->info('Begin cloning item group materials ... -' . $a_source_id . '-'); $cwo = ilCopyWizardOptions::_getInstance($a_copy_id); $mappings = $cwo->getMappings(); @@ -204,15 +204,15 @@ public function cloneItems( $source_ig = new ilItemGroupItems($a_source_id); foreach ($source_ig->getItems() as $item_ref_id) { if (isset($mappings[$item_ref_id]) and $mappings[$item_ref_id]) { - $ilLog->write(__METHOD__ . ': Clone item group item nr. ' . $item_ref_id); + $ilLog->info('Clone item group item nr. ' . $item_ref_id); $new_items[] = $mappings[$item_ref_id]; } else { - $ilLog->write(__METHOD__ . ': No mapping found for item group item nr. ' . $item_ref_id); + $ilLog->info('No mapping found for item group item nr. ' . $item_ref_id); } } $this->setItems($new_items); $this->update(); - $ilLog->write(__METHOD__ . ': Finished cloning item group items ...'); + $ilLog->info('Finished cloning item group items ...'); } public static function _getItemsOfContainer(int $a_ref_id): array diff --git a/components/ILIAS/ItemGroup/classes/class.ilObjItemGroup.php b/components/ILIAS/ItemGroup/classes/class.ilObjItemGroup.php index fc40299ea75c..5c2f7c2a0e00 100755 --- a/components/ILIAS/ItemGroup/classes/class.ilObjItemGroup.php +++ b/components/ILIAS/ItemGroup/classes/class.ilObjItemGroup.php @@ -215,23 +215,23 @@ public static function fixContainerItemGroupRefsAfterCloning( $ilLog = $DIC["ilLog"]; - $ilLog->write(__METHOD__ . ': Fix item group references in ' . $a_source_container->getType()); + $ilLog->info('Fix item group references in ' . $a_source_container->getType()); $cwo = ilCopyWizardOptions::_getInstance($a_copy_id); $mappings = $cwo->getMappings(); $new_container_ref_id = $mappings[$a_source_container->getRefId()]; - $ilLog->write(__METHOD__ . ': 2-' . $new_container_ref_id . '-'); + $ilLog->info('2-' . $new_container_ref_id . '-'); $new_container_obj_id = ilObject::_lookupObjId($new_container_ref_id); - $ilLog->write(__METHOD__ . ': 3' . $new_container_obj_id . '-'); + $ilLog->info('3' . $new_container_obj_id . '-'); if (ilPageObject::_exists("cont", $new_container_obj_id)) { - $ilLog->write(__METHOD__ . ': 4'); + $ilLog->info('4'); $new_page = new ilContainerPage($new_container_obj_id); $new_page->buildDom(); ilPCResources::modifyItemGroupRefIdsByMapping($new_page, $mappings); $new_page->update(); } - $ilLog->write(__METHOD__ . ': 5'); + $ilLog->info('5'); } } diff --git a/components/ILIAS/LDAP/classes/class.ilLDAPRoleGroupMapping.php b/components/ILIAS/LDAP/classes/class.ilLDAPRoleGroupMapping.php index 19b0370e2285..d90e70e105a6 100755 --- a/components/ILIAS/LDAP/classes/class.ilLDAPRoleGroupMapping.php +++ b/components/ILIAS/LDAP/classes/class.ilLDAPRoleGroupMapping.php @@ -105,10 +105,10 @@ public function assign($a_role_id, $a_usr_id): bool return false; } if (!$this->isHandledUser($a_usr_id)) { - $this->log->write('LDAP assign: User ID: ' . $a_usr_id . ' has no LDAP account'); + $this->log->info('LDAP assign: User ID: ' . $a_usr_id . ' has no LDAP account'); return false; } - $this->log->write('LDAP assign: User ID: ' . $a_usr_id . ' Role Id: ' . $a_role_id); + $this->log->info('LDAP assign: User ID: ' . $a_usr_id . ' Role Id: ' . $a_role_id); $this->assignToGroup($a_role_id, $a_usr_id); return true; @@ -157,7 +157,7 @@ public function deassign($a_role_id, $a_usr_id): bool if (!$this->isHandledUser($a_usr_id)) { return false; } - $this->log->write('LDAP deassign: User ID: ' . $a_usr_id . ' Role Id: ' . $a_role_id); + $this->log->info('LDAP deassign: User ID: ' . $a_usr_id . ' Role Id: ' . $a_role_id); $this->deassignFromGroup($a_role_id, $a_usr_id); return true; @@ -262,10 +262,10 @@ private function assignToGroup($a_role_id, $a_usr_id): void // Add user $query_obj = $this->getLDAPQueryInstance($data['server_id'], $data['url']); $query_obj->modAdd($data['dn'], array($data['member'] => $external_account)); - $this->log->write('LDAP assign: Assigned ' . $external_account . ' to group ' . $data['dn']); + $this->log->info('LDAP assign: Assigned ' . $external_account . ' to group ' . $data['dn']); } } catch (ilLDAPQueryException $exc) { - $this->log->write($exc->getMessage()); + $this->log->info($exc->getMessage()); // try next mapping continue; } @@ -291,7 +291,7 @@ private function deassignFromGroup($a_role_id, $a_usr_id): void // Check for other role membership if ($role_id = $this->checkOtherMembership($a_usr_id, $a_role_id, $data)) { - $this->log->write('LDAP deassign: User is still assigned to role "' . $role_id . '".'); + $this->log->info('LDAP deassign: User is still assigned to role "' . $role_id . '".'); continue; } /* @@ -304,7 +304,7 @@ private function deassignFromGroup($a_role_id, $a_usr_id): void // Deassign user $query_obj = $this->getLDAPQueryInstance($data['server_id'], $data['url']); $query_obj->modDelete($data['dn'], array($data['member'] => $external_account)); - $this->log->write('LDAP deassign: Deassigned ' . $external_account . ' from group ' . $data['dn']); + $this->log->info('LDAP deassign: Deassigned ' . $external_account . ' from group ' . $data['dn']); // Delete from cache if (is_array($this->mapping_members[$data['mapping_id']])) { @@ -314,7 +314,7 @@ private function deassignFromGroup($a_role_id, $a_usr_id): void } } } catch (ilLDAPQueryException $exc) { - $this->log->write($exc->getMessage()); + $this->log->info($exc->getMessage()); // try next mapping continue; } diff --git a/components/ILIAS/Language/classes/Setup/class.ilSetupLanguage.php b/components/ILIAS/Language/classes/Setup/class.ilSetupLanguage.php index 89b7e55efa37..eb7fc44c3056 100755 --- a/components/ILIAS/Language/classes/Setup/class.ilSetupLanguage.php +++ b/components/ILIAS/Language/classes/Setup/class.ilSetupLanguage.php @@ -83,7 +83,7 @@ public function txt(string $a_topic, string $a_default_lang_fallback_mod = ''): } if ($translation === "") { - $log->writeLanguageLog($a_topic, $this->lang_key); + $log->debug("Language (" . $this->lang_key . "): topic -" . $a_topic . "- not present"); return "-" . $a_topic . "-"; } diff --git a/components/ILIAS/LearningModule/classes/class.ilLMObject.php b/components/ILIAS/LearningModule/classes/class.ilLMObject.php index 7aa9c4088373..3f1569bc103a 100755 --- a/components/ILIAS/LearningModule/classes/class.ilLMObject.php +++ b/components/ILIAS/LearningModule/classes/class.ilLMObject.php @@ -620,7 +620,7 @@ public static function putInTree( } if ($tree->isInTree($parent_id) && !$tree->isInTree($a_obj->getId())) { - $ilLog->write("LMObject::putInTree: insertNode, ID: " . $a_obj->getId() . + $ilLog->info("insertNode, ID: " . $a_obj->getId() . "Parent ID: " . $parent_id . ", Target: " . $target); $tree->insertNode($a_obj->getId(), $parent_id, $target); @@ -761,7 +761,7 @@ public static function pasteTree( $item = new ilLMPageObject($lm_obj, $a_item_id); } - $ilLog->write("Getting from clipboard type " . $item_type . ", " . + $ilLog->info("Getting from clipboard type " . $item_type . ", " . "Item ID: " . $a_item_id . ", of original LM: " . $item_lm_id); if ($item_lm_id != $a_target_lm->getId() && !$a_as_copy) { @@ -795,7 +795,7 @@ public static function pasteTree( $target_item = $item; } - $ilLog->write("Putting into tree type " . $target_item->getType() . + $ilLog->info("Putting into tree type " . $target_item->getType() . "Item ID: " . $target_item->getId() . ", Parent: " . $a_parent_id . ", " . "Target: " . $a_target . ", Item LM:" . $target_item->getContentObject()->getId()); diff --git a/components/ILIAS/LearningSequence/classes/class.ilObjLearningSequence.php b/components/ILIAS/LearningSequence/classes/class.ilObjLearningSequence.php index 4064699026e9..760833018d3a 100755 --- a/components/ILIAS/LearningSequence/classes/class.ilObjLearningSequence.php +++ b/components/ILIAS/LearningSequence/classes/class.ilObjLearningSequence.php @@ -215,21 +215,21 @@ protected function cloneAutoGeneratedRoles(ilObjLearningSequence $new_obj): bool $new_admin = $new_obj->getDefaultAdminRole(); if (!$admin || !$new_admin || !$this->getRefId() || !$new_obj->getRefId()) { - $this->log->write(__METHOD__ . ' : Error cloning auto generated role: il_lso_admin'); + $this->log->info('Error cloning auto generated role: il_lso_admin'); } $this->rbac_admin->copyRolePermissions($admin, $this->getRefId(), $new_obj->getRefId(), $new_admin, true); - $this->log->write(__METHOD__ . ' : Finished copying of role lso_admin.'); + $this->log->info('Finished copying of role lso_admin.'); $member = $this->getDefaultMemberRole(); $new_member = $new_obj->getDefaultMemberRole(); if (!$member || !$new_member) { - $this->log->write(__METHOD__ . ' : Error cloning auto generated role: il_lso_member'); + $this->log->info('Error cloning auto generated role: il_lso_member'); } $this->rbac_admin->copyRolePermissions($member, $this->getRefId(), $new_obj->getRefId(), $new_member, true); - $this->log->write(__METHOD__ . ' : Finished copying of role lso_member.'); + $this->log->info('Finished copying of role lso_member.'); return true; } diff --git a/components/ILIAS/Logging/classes/NullLogger.php b/components/ILIAS/Logging/classes/NullLogger.php index 3fb5f2012d50..a491e7d23ee6 100755 --- a/components/ILIAS/Logging/classes/NullLogger.php +++ b/components/ILIAS/Logging/classes/NullLogger.php @@ -85,14 +85,6 @@ protected function getLogger(): LoggerInterface throw new Exception('Can not return monolog logger from a null logger.'); } - public function write(string $message, $level = ilLogLevel::INFO, array $context = []): void - { - } - - public function writeLanguageLog(string $topic, string $lang_key): void - { - } - public function logStack(?int $level = null, string $message = '', array $context = []): void { } diff --git a/components/ILIAS/Logging/classes/class.ilLogger.php b/components/ILIAS/Logging/classes/class.ilLogger.php index 62d1002dd378..9e643fbe3f53 100755 --- a/components/ILIAS/Logging/classes/class.ilLogger.php +++ b/components/ILIAS/Logging/classes/class.ilLogger.php @@ -100,28 +100,6 @@ protected function getLogger(): LoggerInterface return $this->logger; } - /** - * write log message - * @deprecated since version 5.1 - * @see ilLogger->info(), ilLogger()->debug(), ... - */ - public function write(string $message, $level = ilLogLevel::INFO, array $context = []): void - { - if (!in_array($level, ilLogLevel::getLevels())) { - $level = ilLogLevel::INFO; - } - $this->getLogger()->log((int) $level, $message, $context); - } - - /** - * Write language log - * @deprecated since version 5.1 - */ - public function writeLanguageLog(string $topic, string $lang_key): void - { - $this->getLogger()->debug("Language (" . $lang_key . "): topic -" . $topic . "- not present"); - } - public function logStack(?int $level = null, string $message = '', array $context = []): void { if (is_null($level)) { diff --git a/components/ILIAS/MediaCast/classes/class.ilObjMediaCastGUI.php b/components/ILIAS/MediaCast/classes/class.ilObjMediaCastGUI.php index 64c1940d9087..a02fcc135d3c 100755 --- a/components/ILIAS/MediaCast/classes/class.ilObjMediaCastGUI.php +++ b/components/ILIAS/MediaCast/classes/class.ilObjMediaCastGUI.php @@ -769,7 +769,7 @@ public function updateCastItemObject(): void foreach (ilObjMediaCast::$purposes as $purpose) { if ($this->form_gui->getInput("delete_" . $purpose)) { $mob->removeMediaItem($purpose); - $ilLog->write("Mcst: deleting purpose $purpose"); + $ilLog->info("Mcst: deleting purpose $purpose"); continue; } $media_item = $mob->getMediaItem($purpose); diff --git a/components/ILIAS/Migration/DBUpdate_3560/classes/class.ilDBUpdateNewObjectType.php b/components/ILIAS/Migration/DBUpdate_3560/classes/class.ilDBUpdateNewObjectType.php index cf894d65fe58..a9612a4d2583 100755 --- a/components/ILIAS/Migration/DBUpdate_3560/classes/class.ilDBUpdateNewObjectType.php +++ b/components/ILIAS/Migration/DBUpdate_3560/classes/class.ilDBUpdateNewObjectType.php @@ -257,7 +257,7 @@ public static function deleteRBACOperation(string $type, int $ops_id): void . "WHERE typ_id = " . $ilDB->quote($type_id, "integer") . PHP_EOL . "AND ops_id = " . $ilDB->quote($ops_id, "integer") . PHP_EOL ; - $GLOBALS['ilLog']->write(__METHOD__ . ': ' . $sql); + $GLOBALS['ilLog']->info($sql); $ilDB->manipulate($sql); self::deleteRBACTemplateOperation($type, $ops_id); @@ -281,7 +281,7 @@ public static function deleteRBACTemplateOperation(string $type, int $ops_id): v . "WHERE type = " . $ilDB->quote($type, "text") . PHP_EOL . "ops_id = " . $ilDB->quote($ops_id, "integer") . PHP_EOL ; - $GLOBALS['ilLog']->write(__METHOD__ . ': ' . $sql); + $GLOBALS['ilLog']->info($sql); $ilDB->manipulate($sql); } diff --git a/components/ILIAS/OrgUnit/classes/LocalUser/class.ilLocalUserGUI.php b/components/ILIAS/OrgUnit/classes/LocalUser/class.ilLocalUserGUI.php index 37b71c49aa1a..68c859f7acd0 100755 --- a/components/ILIAS/OrgUnit/classes/LocalUser/class.ilLocalUserGUI.php +++ b/components/ILIAS/OrgUnit/classes/LocalUser/class.ilLocalUserGUI.php @@ -190,7 +190,7 @@ public function performDeleteUsers(): bool $this->checkPermission("cat_administrate_users"); foreach ($_POST['user_ids'] as $user_id) { if (!in_array($user_id, ilLocalUser::_getAllUserIds($this->getRefId()))) { - $this->logger->write(__FILE__ . ":" . __LINE__ . " User with id $user_id could not be found."); + $this->logger->info("User with id $user_id could not be found."); $this->tpl->setOnScreenMessage('failure', $this->lng->txt('user_not_found_to_delete')); } if (!$tmp_obj = ilObjectFactory::getInstanceByObjId((int) $user_id, false)) { diff --git a/components/ILIAS/OrgUnit/classes/SimpleImport/class.ilOrgUnitSimpleImport.php b/components/ILIAS/OrgUnit/classes/SimpleImport/class.ilOrgUnitSimpleImport.php index 8d9fd335908c..4bce3783b18d 100755 --- a/components/ILIAS/OrgUnit/classes/SimpleImport/class.ilOrgUnitSimpleImport.php +++ b/components/ILIAS/OrgUnit/classes/SimpleImport/class.ilOrgUnitSimpleImport.php @@ -171,7 +171,7 @@ protected function moveObject(int $ref_id, int $parent_ref_id, string $ou_id, st global $DIC; $ilLog = $DIC['ilLog']; $this->addWarning("not_movable", $ou_id ? $ou_id : $external_id, "update"); - $ilLog->write($e->getMessage() . "\\n" . $e->getTraceAsString()); + $ilLog->info($e->getMessage() . "\\n" . $e->getTraceAsString()); error_log($e->getMessage() . "\\n" . $e->getTraceAsString()); } } diff --git a/components/ILIAS/OrgUnit/classes/SimpleImport/class.ilOrgUnitSimpleImportGUI.php b/components/ILIAS/OrgUnit/classes/SimpleImport/class.ilOrgUnitSimpleImportGUI.php index ae10f20e1f59..e0a62f04ccb9 100755 --- a/components/ILIAS/OrgUnit/classes/SimpleImport/class.ilOrgUnitSimpleImportGUI.php +++ b/components/ILIAS/OrgUnit/classes/SimpleImport/class.ilOrgUnitSimpleImportGUI.php @@ -171,7 +171,7 @@ public function startImport() $importer->simpleImport($file_path); } catch (Exception $e) { - $this->ilLog->write($e->getMessage() . " - " . $e->getTraceAsString()); + $this->ilLog->info($e->getMessage() . " - " . $e->getTraceAsString()); $this->tpl->setOnScreenMessage('failure', $this->lng->txt("import_failed"), true); $this->ctrl->redirect($this, "render"); } diff --git a/components/ILIAS/OrgUnit/classes/SimpleUserImport/class.ilOrgUnitSimpleUserImportGUI.php b/components/ILIAS/OrgUnit/classes/SimpleUserImport/class.ilOrgUnitSimpleUserImportGUI.php index 66b51ddf1afe..79e8a3e10c89 100755 --- a/components/ILIAS/OrgUnit/classes/SimpleUserImport/class.ilOrgUnitSimpleUserImportGUI.php +++ b/components/ILIAS/OrgUnit/classes/SimpleUserImport/class.ilOrgUnitSimpleUserImportGUI.php @@ -104,7 +104,7 @@ public function startImport(): void try { $importer->simpleUserImport($file['tmp_name']); } catch (Exception $e) { - $this->ilLog->write($e->getMessage() . ' - ' . $e->getTraceAsString()); + $this->ilLog->info($e->getMessage() . ' - ' . $e->getTraceAsString()); $this->tpl->setOnScreenMessage('failure', $this->lng->txt('import_failed'), true); $this->ctrl->redirect($this, 'render'); } diff --git a/components/ILIAS/Repository/Deletion/EventStandardAdapter.php b/components/ILIAS/Repository/Deletion/EventStandardAdapter.php index 66f2d73c8975..dc72dc64a9aa 100644 --- a/components/ILIAS/Repository/Deletion/EventStandardAdapter.php +++ b/components/ILIAS/Repository/Deletion/EventStandardAdapter.php @@ -43,7 +43,7 @@ public function beforeMoveToTrash(int $ref_id, array $subnodes): void public function afterMoveToTrash(int $ref_id, int $old_parent_ref_id): void { - $this->log->write("ilObjectGUI::confirmedDeleteObject(), moved ref_id " . $ref_id . + $this->log->info("moved ref_id " . $ref_id . " to trash"); $this->event_handler->raise( diff --git a/components/ILIAS/Repository/TreeValidator/class.ilValidator.php b/components/ILIAS/Repository/TreeValidator/class.ilValidator.php index 600604f9893b..e1c021dd54bb 100755 --- a/components/ILIAS/Repository/TreeValidator/class.ilValidator.php +++ b/components/ILIAS/Repository/TreeValidator/class.ilValidator.php @@ -898,11 +898,7 @@ public function removeInvalidReferences( removal starts here ********************/ - $message = sprintf( - '%s::removeInvalidReferences(): Started...', - get_class($this) - ); - $ilLog->write($message, $ilLog->WARNING); + $ilLog->warning('Started...'); // to make sure $this->filterWorkspaceObjects($a_invalid_refs); @@ -913,11 +909,10 @@ public function removeInvalidReferences( $res = $ilDB->manipulate($query); $message = sprintf( - '%s::removeInvalidReferences(): Reference %s removed', - get_class($this), + 'Reference %s removed', $entry["ref_id"] ); - $ilLog->write($message, $ilLog->WARNING); + $ilLog->warning($message); $this->writeScanLogLine("Entry " . $entry["ref_id"] . " removed"); } @@ -962,22 +957,17 @@ public function removeInvalidChilds( removal starts here ********************/ - $message = sprintf( - '%s::removeInvalidChilds(): Started...', - get_class($this) - ); - $ilLog->write($message, $ilLog->WARNING); + $ilLog->warning('Started...'); foreach ($a_invalid_childs as $entry) { $q = "DELETE FROM tree WHERE child='" . $entry["child"] . "'"; $this->db->query($q); $message = sprintf( - '%s::removeInvalidChilds(): Entry child=%s removed', - get_class($this), + 'Entry child=%s removed', $entry["child"] ); - $ilLog->write($message, $ilLog->WARNING); + $ilLog->warning($message); $this->writeScanLogLine("Entry " . $entry["child"] . " removed"); } @@ -1025,11 +1015,7 @@ public function removeInvalidRolefolders( $removed = false; - $message = sprintf( - '%s::removeInvalidRolefolders(): Started...', - get_class($this) - ); - $ilLog->write($message, $ilLog->WARNING); + $ilLog->warning('Started...'); // to make sure $this->filterWorkspaceObjects($a_invalid_rolefolders); @@ -1096,11 +1082,7 @@ public function restoreMissingObjects( $restored = false; - $message = sprintf( - '%s::restoreMissingObjects(): Started...', - get_class($this) - ); - $ilLog->write($message, $ilLog->WARNING); + $ilLog->warning('Started...'); // to make sure $this->filterWorkspaceObjects($a_missing_objects); @@ -1153,12 +1135,11 @@ public function restoreReference(int $a_obj_id) $res = $ilDB->manipulate($query); $message = sprintf( - '%s::restoreReference(): new reference %s for obj_id %s created', - get_class($this), + 'new reference %s for obj_id %s created', $next_id, $a_obj_id ); - $ilLog->write($message, $ilLog->WARNING); + $ilLog->warning($message); return $next_id; } @@ -1190,11 +1171,7 @@ public function restoreUnboundObjects( return false; } - $message = sprintf( - '%s::restoreUnboundObjects(): Started...', - get_class($this) - ); - $ilLog->write($message, $ilLog->WARNING); + $ilLog->warning('Started...'); // start restore process return $this->restoreSubTrees($a_unbound_objects); @@ -1228,11 +1205,7 @@ public function restoreTrash( return false; } - $message = sprintf( - '%s::restoreTrash(): Started...', - get_class($this) - ); - $ilLog->write($message, $ilLog->WARNING); + $ilLog->warning('Started...'); // start restore process $restored = $this->restoreDeletedObjects($a_deleted_objects); @@ -1241,11 +1214,7 @@ public function restoreTrash( $q = "DELETE FROM tree WHERE tree!=1"; $this->db->query($q); - $message = sprintf( - '%s::restoreTrash(): Removed all trees with tree id <> 1', - get_class($this) - ); - $ilLog->write($message, $ilLog->WARNING); + $ilLog->warning('Removed all trees with tree id <> 1'); $this->writeScanLogLine("Old tree entries removed"); } @@ -1279,11 +1248,7 @@ public function restoreDeletedObjects( return false; } - $message = sprintf( - '%s::restoreDeletedObjects()): Started...', - get_class($this) - ); - $ilLog->write($message, $ilLog->WARNING); + $ilLog->warning('Started...'); // first delete all rolefolders // don't save rolefolders, remove them @@ -1344,11 +1309,7 @@ public function restoreSubTrees( $subnodes = []; $topnode = []; - $message = sprintf( - '%s::restoreSubTrees(): Started...', - get_class($this) - ); - $ilLog->write($message, $ilLog->WARNING); + $ilLog->warning('Started...'); // process move subtree foreach ($a_nodes as $node) { @@ -1425,11 +1386,7 @@ public function purgeTrash( if ($a_nodes === null && isset($this->deleted_objects)) { $a_nodes = $this->deleted_objects; } - $message = sprintf( - '%s::purgeTrash(): Started...', - get_class($this) - ); - $ilLog->write($message, $ilLog->WARNING); + $ilLog->warning('Started...'); // start purge process return $this->purgeObjects($a_nodes); @@ -1456,11 +1413,7 @@ public function purgeUnboundObjects( $a_nodes = $this->unbound_objects; } - $message = sprintf( - '%s::purgeUnboundObjects(): Started...', - get_class($this) - ); - $ilLog->write($message, $ilLog->WARNING); + $ilLog->warning('Started...'); // start purge process return $this->purgeObjects($a_nodes); @@ -1487,11 +1440,7 @@ public function purgeMissingObjects( $a_nodes = $this->missing_objects; } - $message = sprintf( - '%s::purgeMissingObjects(): Started...', - get_class($this) - ); - $ilLog->write($message, $ilLog->WARNING); + $ilLog->warning('Started...'); // start purge process return $this->purgeObjects($a_nodes); @@ -1564,12 +1513,11 @@ public function purgeObjects( } $message = sprintf( - '%s::purgeObjects(): Removing object (id:%s ref:%s)', - get_class($this), + 'Removing object (id:%s ref:%s)', $ref_id, $node_obj->getId() ); - $ilLog->write($message, $ilLog->WARNING); + $ilLog->warning($message); $startTime = microtime(true); $node_obj->delete(); @@ -1601,11 +1549,7 @@ public function initGapsInTree(): bool $tree = $this->tree; $ilLog = $this->log; - $message = sprintf( - '%s::initGapsInTree(): Started...', - get_class($this) - ); - $ilLog->write($message, $ilLog->WARNING); + $ilLog->warning('Started...'); // check mode: clean if ($this->mode["clean"] !== true) { diff --git a/components/ILIAS/Scorm2004/classes/class.ilObjSCORM2004LearningModule.php b/components/ILIAS/Scorm2004/classes/class.ilObjSCORM2004LearningModule.php index 3e98489cd8d5..079dcfc08c28 100755 --- a/components/ILIAS/Scorm2004/classes/class.ilObjSCORM2004LearningModule.php +++ b/components/ILIAS/Scorm2004/classes/class.ilObjSCORM2004LearningModule.php @@ -274,7 +274,7 @@ public function convert_1_2_to_2004(string $manifest): void //transform manifest file $this->totransform = $doc; - $ilLog->write("SCORM: about to transform to SCORM 2004"); + $ilLog->info("SCORM: about to transform to SCORM 2004"); $xsl = new DOMDocument(); // $xsl->async = false; @@ -284,7 +284,7 @@ public function convert_1_2_to_2004(string $manifest): void file_put_contents($this->imsmanifestFile, $prc->transformToXML($this->totransform)); - $ilLog->write("SCORM: Transformation completed"); + $ilLog->info("SCORM: Transformation completed"); } /** diff --git a/components/ILIAS/Scorm2004/classes/class.ilSCORM2004StoreData.php b/components/ILIAS/Scorm2004/classes/class.ilSCORM2004StoreData.php index d4a2cf50ab54..8329f6c7edab 100755 --- a/components/ILIAS/Scorm2004/classes/class.ilSCORM2004StoreData.php +++ b/components/ILIAS/Scorm2004/classes/class.ilSCORM2004StoreData.php @@ -659,7 +659,7 @@ public static function syncGlobalStatus(int $userId, int $packageId, int $refId, $ilDB = $DIC->database(); $ilLog = $DIC["ilLog"]; $saved_global_status = $data->saved_global_status; - $ilLog->write("saved_global_status=" . $saved_global_status); + $ilLog->info("saved_global_status=" . $saved_global_status); //update percentage_completed, sco_total_time_sec,status in sahs_user $totalTime = (int) $data->totalTimeCentisec; diff --git a/components/ILIAS/ScormAicc/classes/SCORM/class.ilObjSCORMTracking.php b/components/ILIAS/ScormAicc/classes/SCORM/class.ilObjSCORMTracking.php index b2949d9703b4..b708d45030f1 100755 --- a/components/ILIAS/ScormAicc/classes/SCORM/class.ilObjSCORMTracking.php +++ b/components/ILIAS/ScormAicc/classes/SCORM/class.ilObjSCORMTracking.php @@ -75,7 +75,7 @@ public static function storeJsApiCmi(int $user_id, int $obj_id, object $data): b } if ($obj_id <= 1) { - $ilLog->write("ScormAicc: storeJsApi: Error: No valid obj_id given."); + $ilLog->info("ScormAicc: storeJsApi: Error: No valid obj_id given."); } else { foreach ($aa_data as $a_data) { $set = $ilDB->queryF( @@ -155,7 +155,7 @@ public static function syncGlobalStatus(int $userId, int $packageId, int $refId, $ilDB = $DIC->database(); $ilLog = ilLoggerFactory::getLogger('sahs'); $saved_global_status = $data->saved_global_status; - $ilLog->write("saved_global_status=" . $saved_global_status); + $ilLog->info("saved_global_status=" . $saved_global_status); // get attempts if (!isset($data->packageAttempts)) { @@ -580,7 +580,7 @@ public static function scorm12PlayerUnload(): void $ref_id = $DIC->http()->wrapper()->query()->retrieve('ref_id', $DIC->refinery()->kindlyTo()->int()); $obj_id = $DIC->http()->wrapper()->query()->retrieve('package_id', $DIC->refinery()->kindlyTo()->int()); if ($obj_id <= 1) { - $GLOBALS['DIC']['ilLog']->write(__METHOD__ . ' no valid obj_id'); + $GLOBALS['DIC']['ilLog']->info('no valid obj_id'); } else { $last_visited = ""; if ($DIC->http()->wrapper()->query()->has('last_visited')) { diff --git a/components/ILIAS/ScormAicc/classes/SCORM/class.ilSCORMItem.php b/components/ILIAS/ScormAicc/classes/SCORM/class.ilSCORMItem.php index a83ea6de9fa0..4c775520abd8 100755 --- a/components/ILIAS/ScormAicc/classes/SCORM/class.ilSCORMItem.php +++ b/components/ILIAS/ScormAicc/classes/SCORM/class.ilSCORMItem.php @@ -308,7 +308,7 @@ public function delete(): void array($this->getId()) ); - $ilLog->write("SAHS Delete(ScormItem): " . + $ilLog->info("SAHS Delete(ScormItem): " . 'DELETE FROM scorm_tracking WHERE sco_id = ' . $this->getId() . ' AND obj_id = ' . $this->getSLMId()); $ilDB->manipulateF( 'DELETE FROM scorm_tracking WHERE sco_id = %s AND obj_id = %s', diff --git a/components/ILIAS/ScormAicc/classes/class.ilObjSAHSLearningModule.php b/components/ILIAS/ScormAicc/classes/class.ilObjSAHSLearningModule.php index 246419679482..6a313e99b7df 100755 --- a/components/ILIAS/ScormAicc/classes/class.ilObjSAHSLearningModule.php +++ b/components/ILIAS/ScormAicc/classes/class.ilObjSAHSLearningModule.php @@ -1085,7 +1085,7 @@ public function delete(): bool } $q_log = "DELETE FROM scorm_tracking WHERE obj_id = " . $ilDB->quote($this->getId()); - $ilLog->write("SAHS Delete(SAHSLM): " . $q_log); + $ilLog->info("SAHS Delete(SAHSLM): " . $q_log); $ilDB->manipulateF( 'DELETE FROM scorm_tracking WHERE obj_id = %s', @@ -1094,7 +1094,7 @@ public function delete(): bool ); $q_log = "DELETE FROM sahs_user WHERE obj_id = " . $ilDB->quote($this->getId()); - $ilLog->write("SAHS Delete(SAHSLM): " . $q_log); + $ilLog->info("SAHS Delete(SAHSLM): " . $q_log); $ilDB->manipulateF( 'DELETE FROM sahs_user WHERE obj_id = %s', diff --git a/components/ILIAS/ScormAicc/classes/class.ilScormAiccDataSet.php b/components/ILIAS/ScormAicc/classes/class.ilScormAiccDataSet.php index 295e6103323f..a1a427386250 100755 --- a/components/ILIAS/ScormAicc/classes/class.ilScormAiccDataSet.php +++ b/components/ILIAS/ScormAicc/classes/class.ilScormAiccDataSet.php @@ -155,7 +155,7 @@ public function writeData(string $a_entity, string $a_version, int $a_id, array } } } else { - $ilLog->write("no module properties for imported object"); + $ilLog->info("no module properties for imported object"); } } @@ -175,7 +175,7 @@ public function getExtendedXmlRepresentation( global $DIC; $ilLog = ilLoggerFactory::getLogger('sahs'); - $ilLog->write(json_encode($this->getTypes("sahs", "5.1.0"), JSON_PRETTY_PRINT)); + $ilLog->info(json_encode($this->getTypes("sahs", "5.1.0"), JSON_PRETTY_PRINT)); $this->dircnt = 1; diff --git a/components/ILIAS/Skill/Node/class.SkillTreeNodeManager.php b/components/ILIAS/Skill/Node/class.SkillTreeNodeManager.php index e97f5239e395..2fc2ed894e4c 100755 --- a/components/ILIAS/Skill/Node/class.SkillTreeNodeManager.php +++ b/components/ILIAS/Skill/Node/class.SkillTreeNodeManager.php @@ -285,7 +285,7 @@ protected function pasteTree( $item = new \ilSkillTemplateCategory($a_item_id); } - $ilLog->write("Getting from clipboard type " . $item_type . ", " . + $ilLog->info("Getting from clipboard type " . $item_type . ", " . "Item ID: " . $a_item_id); if ($a_as_copy) { @@ -299,7 +299,7 @@ protected function pasteTree( $target_item = $item; } - $ilLog->write("Putting into skill tree type " . $target_item->getType() . + $ilLog->info("Putting into skill tree type " . $target_item->getType() . "Item ID: " . $target_item->getId() . ", Parent: " . $a_parent_id . ", " . "Target: " . $a_target); diff --git a/components/ILIAS/StudyProgramme/classes/Mail/class.ilPRGMail.php b/components/ILIAS/StudyProgramme/classes/Mail/class.ilPRGMail.php index 7bb1abd6b321..a2b6161e518b 100755 --- a/components/ILIAS/StudyProgramme/classes/Mail/class.ilPRGMail.php +++ b/components/ILIAS/StudyProgramme/classes/Mail/class.ilPRGMail.php @@ -99,7 +99,7 @@ protected function sendMail( $mail->enqueue($login, '', '', $subject, $body, []); return true; } catch (Exception $e) { - $this->log->write($e->getMessage()); + $this->log->info($e->getMessage()); return false; } } @@ -109,7 +109,7 @@ public function sendInformToReAssignMail(int $assignment_id, int $root_prg_id): list($ass, $prg) = $this->getAssignmentAndProgramme($assignment_id, $root_prg_id); if (! $prg->getSettings()->getAutoMailSettings()->getReminderNotRestartedByUserDays() > 0) { - $this->log->write("Send info to re-assign mail is deactivated in study programme settings"); + $this->log->info("Send info to re-assign mail is deactivated in study programme settings"); return; } @@ -138,7 +138,7 @@ public function sendRiskyToFailMail(int $assignment_id, int $root_prg_id): void list($ass, $prg) = $this->getAssignmentAndProgramme($assignment_id, $root_prg_id); if (! $prg->getSettings()->getAutoMailSettings()->getProcessingEndsNotSuccessfulDays() > 0) { - $this->log->write("Send risky to fail mail is deactivated in study programme settings"); + $this->log->info("Send risky to fail mail is deactivated in study programme settings"); return; } @@ -167,7 +167,7 @@ public function sendReAssignedMail(int $assignment_id, int $root_prg_id): bool list($ass, $prg) = $this->getAssignmentAndProgramme($assignment_id, $root_prg_id); if (! $prg->getSettings()->getAutoMailSettings()->getSendReAssignedMail()) { - $this->log->write("Send re assign mail is deactivated in study programme settings"); + $this->log->info("Send re assign mail is deactivated in study programme settings"); return false; } diff --git a/components/ILIAS/StudyProgramme/classes/class.ilPrgInvalidateExpiredProgressesCronJob.php b/components/ILIAS/StudyProgramme/classes/class.ilPrgInvalidateExpiredProgressesCronJob.php index fa861c40df12..8b1744173f4f 100755 --- a/components/ILIAS/StudyProgramme/classes/class.ilPrgInvalidateExpiredProgressesCronJob.php +++ b/components/ILIAS/StudyProgramme/classes/class.ilPrgInvalidateExpiredProgressesCronJob.php @@ -100,7 +100,7 @@ public function run(): JobResult $assignment = $assignment->invalidate($this->settings_repo); $this->assignment_repo->store($assignment); } catch (ilException $e) { - $this->log->write('an error occured: ' . $e->getMessage()); + $this->log->info('an error occured: ' . $e->getMessage()); $result->setStatus(JobResult::STATUS_FAIL); return $result; } diff --git a/components/ILIAS/StudyProgramme/classes/class.ilPrgRestartAssignmentsCronJob.php b/components/ILIAS/StudyProgramme/classes/class.ilPrgRestartAssignmentsCronJob.php index f7221d21c311..e45aa8e0dad4 100755 --- a/components/ILIAS/StudyProgramme/classes/class.ilPrgRestartAssignmentsCronJob.php +++ b/components/ILIAS/StudyProgramme/classes/class.ilPrgRestartAssignmentsCronJob.php @@ -159,6 +159,6 @@ protected function getNow(): DateTimeImmutable protected function log(string $msg): void { - $this->log->write($msg); + $this->log->info($msg); } } diff --git a/components/ILIAS/StudyProgramme/classes/class.ilPrgUserNotRestartedCronJob.php b/components/ILIAS/StudyProgramme/classes/class.ilPrgUserNotRestartedCronJob.php index 1cada71de4d9..0d4928f09a7c 100755 --- a/components/ILIAS/StudyProgramme/classes/class.ilPrgUserNotRestartedCronJob.php +++ b/components/ILIAS/StudyProgramme/classes/class.ilPrgUserNotRestartedCronJob.php @@ -128,6 +128,6 @@ protected function getNow(): DateTimeImmutable protected function log(string $msg): void { - $this->log->write($msg); + $this->log->info($msg); } } diff --git a/components/ILIAS/StudyProgramme/classes/class.ilPrgUserRiskyToFailCronJob.php b/components/ILIAS/StudyProgramme/classes/class.ilPrgUserRiskyToFailCronJob.php index 58bb9e9c3392..ca902a0238ed 100755 --- a/components/ILIAS/StudyProgramme/classes/class.ilPrgUserRiskyToFailCronJob.php +++ b/components/ILIAS/StudyProgramme/classes/class.ilPrgUserRiskyToFailCronJob.php @@ -129,6 +129,6 @@ protected function getNow(): \DateTimeImmutable protected function log(string $msg): void { - $this->log->write($msg); + $this->log->info($msg); } } diff --git a/components/ILIAS/StudyProgramme/classes/memberexport/ilFSStoragePRG.php b/components/ILIAS/StudyProgramme/classes/memberexport/ilFSStoragePRG.php index e2122974579b..086e33c58ef5 100755 --- a/components/ILIAS/StudyProgramme/classes/memberexport/ilFSStoragePRG.php +++ b/components/ILIAS/StudyProgramme/classes/memberexport/ilFSStoragePRG.php @@ -106,7 +106,7 @@ public function addMemberExportFile($a_data, $a_rel_name): bool { $this->initMemberExportDirectory(); if (!$this->writeToFile($a_data, $this->getMemberExportDirectory() . '/' . $a_rel_name)) { - $this->logger->write('Cannot write to file: ' . $this->getMemberExportDirectory() . '/' . $a_rel_name); + $this->logger->info('Cannot write to file: ' . $this->getMemberExportDirectory() . '/' . $a_rel_name); return false; } diff --git a/components/ILIAS/Survey/Export/class.ilSurveyExporter.php b/components/ILIAS/Survey/Export/class.ilSurveyExporter.php index eba060b138e9..59b96e54fd41 100755 --- a/components/ILIAS/Survey/Export/class.ilSurveyExporter.php +++ b/components/ILIAS/Survey/Export/class.ilSurveyExporter.php @@ -62,7 +62,7 @@ public function getXmlRepresentation( // here: svy_data/svy_301/export/1698817474__0__svy_301 // svy_301/export/1698817474__0__svy_301/Modules/Survey/set_1 // svy_data/svy_301/export/1698817474__0__svy_301.zip - $GLOBALS['ilLog']->write(__METHOD__ . ': Created zip file ' . $zip); + $GLOBALS['ilLog']->info('Created zip file ' . $zip); return ""; } else { return $this->ds->getXmlRepresentation($a_entity, $a_schema_version, [$a_id], "", true, true); diff --git a/components/ILIAS/Survey/Export/class.ilSurveyImporter.php b/components/ILIAS/Survey/Export/class.ilSurveyImporter.php index 8f2eacddd1c9..010eb4a94a55 100755 --- a/components/ILIAS/Survey/Export/class.ilSurveyImporter.php +++ b/components/ILIAS/Survey/Export/class.ilSurveyImporter.php @@ -97,10 +97,10 @@ public function importXmlRepresentation( [$xml_file] = $this->parseXmlFileNames(); if (!file_exists($xml_file)) { - $GLOBALS['ilLog']->write(__METHOD__ . ': Cannot find xml definition: ' . $xml_file); + $GLOBALS['ilLog']->info('Cannot find xml definition: ' . $xml_file); return; } - $GLOBALS['ilLog']->write("getQuestionPoolID = " . $this->getImport()->getConfig("components/ILIAS/Survey")->getQuestionPoolID()); + $GLOBALS['ilLog']->info("getQuestionPoolID = " . $this->getImport()->getConfig("components/ILIAS/Survey")->getQuestionPoolID()); $import = new SurveyImportParser( $this->getImport()->getConfig("components/ILIAS/Survey")->getQuestionPoolID(), @@ -136,7 +136,7 @@ public function importXmlRepresentation( */ protected function parseXmlFileNames(): array { - $GLOBALS['ilLog']->write(__METHOD__ . ': ' . $this->getImportDirectory()); + $GLOBALS['ilLog']->info($this->getImportDirectory()); $basename = basename($this->getImportDirectory()); $xml = $this->getImportDirectory() . '/' . $basename . '.xml'; diff --git a/components/ILIAS/Survey/Participants/class.ilSurveyParticipantsGUI.php b/components/ILIAS/Survey/Participants/class.ilSurveyParticipantsGUI.php index 70fb9d0f124f..615935b589fd 100755 --- a/components/ILIAS/Survey/Participants/class.ilSurveyParticipantsGUI.php +++ b/components/ILIAS/Survey/Participants/class.ilSurveyParticipantsGUI.php @@ -822,7 +822,7 @@ public function insertSavedMessageObject(): void } } catch (Exception $e) { $ilLog = $this->log; - $ilLog->write('Error: ' . $e->getMessage()); + $ilLog->info('Error: ' . $e->getMessage()); } $this->tpl->setVariable("ADM_CONTENT", $form_gui->getHTML()); } @@ -845,7 +845,7 @@ public function deleteSavedMessageObject(): void } } catch (Exception $e) { $ilLog = $this->log; - $ilLog->write('Error: ' . $e->getMessage()); + $ilLog->info('Error: ' . $e->getMessage()); } $this->tpl->setVariable("ADM_CONTENT", $form_gui->getHTML()); } diff --git a/components/ILIAS/SurveyQuestionPool/Export/class.ilSurveyQuestionPoolImporter.php b/components/ILIAS/SurveyQuestionPool/Export/class.ilSurveyQuestionPoolImporter.php index c166a3be4411..60f57502ca59 100755 --- a/components/ILIAS/SurveyQuestionPool/Export/class.ilSurveyQuestionPoolImporter.php +++ b/components/ILIAS/SurveyQuestionPool/Export/class.ilSurveyQuestionPoolImporter.php @@ -39,7 +39,7 @@ public function importXmlRepresentation( # Try legacy import $xml_file = $this->getXmlFileName(); if (file_exists($xml_file)) { - $GLOBALS['ilLog']->write(__METHOD__ . ': Cannot find xml definition: ' . $xml_file); + $GLOBALS['ilLog']->info('Cannot find xml definition: ' . $xml_file); // import qti data $newObj->importObject($xml_file); } diff --git a/components/ILIAS/TestQuestionPool/classes/class.assImagemapQuestion.php b/components/ILIAS/TestQuestionPool/classes/class.assImagemapQuestion.php index 67e0de5a6874..e973314dd88a 100755 --- a/components/ILIAS/TestQuestionPool/classes/class.assImagemapQuestion.php +++ b/components/ILIAS/TestQuestionPool/classes/class.assImagemapQuestion.php @@ -319,7 +319,7 @@ public function setImageFilename( $this->tpl->setOnScreenMessage('failure', 'The image could not be uploaded!'); return; } - $this->log->write('gespeichert: ' . $imagepath . $image_filename); + $this->log->info('gespeichert: ' . $imagepath . $image_filename); } } diff --git a/components/ILIAS/TestQuestionPool/classes/class.ilQuestionPageParser.php b/components/ILIAS/TestQuestionPool/classes/class.ilQuestionPageParser.php index f8e332b7d9bb..b888445479ec 100755 --- a/components/ILIAS/TestQuestionPool/classes/class.ilQuestionPageParser.php +++ b/components/ILIAS/TestQuestionPool/classes/class.ilQuestionPageParser.php @@ -147,7 +147,7 @@ public function storeTree(): void switch ($pg['type']) { case 'pg_alias': if ($this->pg_mapping[$pg['id']] == '') { - $ilLog->write('LM Import: No PageObject for PageAlias ' . + $ilLog->info('LM Import: No PageObject for PageAlias ' . $pg['id'] . ' found! (Please update export installation to ILIAS 3.3.0)'); // Jump two levels up. First level is switch diff --git a/components/ILIAS/TestQuestionPool/classes/class.ilTestQuestionPoolExporter.php b/components/ILIAS/TestQuestionPool/classes/class.ilTestQuestionPoolExporter.php index 9234ff485c35..9ad04c2ce93b 100755 --- a/components/ILIAS/TestQuestionPool/classes/class.ilTestQuestionPoolExporter.php +++ b/components/ILIAS/TestQuestionPool/classes/class.ilTestQuestionPoolExporter.php @@ -65,7 +65,7 @@ public function getXmlRepresentation(string $a_entity, string $a_schema_version, $qpl_exp->buildExportFile(); global $DIC; /* @var ILIAS\DI\Container $DIC */ - $DIC['ilLog']->write(__METHOD__ . ': Created zip file'); + $DIC['ilLog']->info(': Created zip file'); return ''; // sagt mjansen } diff --git a/components/ILIAS/TestQuestionPool/classes/class.ilTestQuestionPoolImporter.php b/components/ILIAS/TestQuestionPool/classes/class.ilTestQuestionPoolImporter.php index f8d033a24518..78ae5f10e618 100755 --- a/components/ILIAS/TestQuestionPool/classes/class.ilTestQuestionPoolImporter.php +++ b/components/ILIAS/TestQuestionPool/classes/class.ilTestQuestionPoolImporter.php @@ -71,16 +71,16 @@ public function importXmlRepresentation( ilSession::clear('qpl_import_selected_questions'); } else { // Shouldn't happen - $DIC['ilLog']->write(__METHOD__ . ': non container and no tax mapping, perhaps old qpl export'); + $DIC['ilLog']->info('non container and no tax mapping, perhaps old qpl export'); return; } if (!file_exists($xmlfile)) { - $DIC['ilLog']->write(__METHOD__ . ': Cannot find xml definition: ' . $xmlfile); + $DIC['ilLog']->info('Cannot find xml definition: ' . $xmlfile); return; } if (!file_exists($qtifile)) { - $DIC['ilLog']->write(__METHOD__ . ': Cannot find qti definition: ' . $qtifile); + $DIC['ilLog']->info('Cannot find qti definition: ' . $qtifile); return; } @@ -102,7 +102,7 @@ public function importXmlRepresentation( // TODO: move all logic to ilObjQuestionPoolGUI::importVerifiedFile and call // this method from ilObjQuestionPoolGUI and ilTestImporter - $DIC['ilLog']->write(__METHOD__ . ': xml file: ' . $xmlfile . ', qti file:' . $qtifile); + $DIC['ilLog']->info('xml file: ' . $xmlfile . ', qti file:' . $qtifile); $qtiParser = new ilQTIParser( $importdir, diff --git a/components/ILIAS/TestQuestionPool/classes/import/qti12/class.assClozeTestImport.php b/components/ILIAS/TestQuestionPool/classes/import/qti12/class.assClozeTestImport.php index a0e2f8b971ef..1e95b8d5c56d 100755 --- a/components/ILIAS/TestQuestionPool/classes/import/qti12/class.assClozeTestImport.php +++ b/components/ILIAS/TestQuestionPool/classes/import/qti12/class.assClozeTestImport.php @@ -328,7 +328,7 @@ public function fromXML( foreach (ilSession::get('import_mob_xhtml') as $mob) { $importfile = $importdirectory . DIRECTORY_SEPARATOR . $mob['uri']; global $DIC; - $DIC['ilLog']->write(__METHOD__ . ': import mob from dir: ' . $importfile); + $DIC['ilLog']->info('import mob from dir: ' . $importfile); $media_object = ilObjMediaObject::_saveTempFileAsMediaObject(basename($importfile), $importfile, false); $questiontext = str_replace('src="' . $mob['mob'] . '"', 'src="' . 'il_' . IL_INST_ID . '_mob_' . $media_object->getId() . '"', $questiontext); diff --git a/components/ILIAS/TestQuestionPool/classes/import/qti12/class.assErrorTextImport.php b/components/ILIAS/TestQuestionPool/classes/import/qti12/class.assErrorTextImport.php index 2f34cae75ead..aaa7db0a95a1 100755 --- a/components/ILIAS/TestQuestionPool/classes/import/qti12/class.assErrorTextImport.php +++ b/components/ILIAS/TestQuestionPool/classes/import/qti12/class.assErrorTextImport.php @@ -76,7 +76,7 @@ public function fromXML( foreach (ilSession::get("import_mob_xhtml") as $mob) { $importfile = $importdirectory . DIRECTORY_SEPARATOR . $mob["uri"]; global $DIC; /* @var ILIAS\DI\Container $DIC */ - $DIC['ilLog']->write(__METHOD__ . ': import mob from dir: ' . $importfile); + $DIC['ilLog']->info('import mob from dir: ' . $importfile); $media_object = ilObjMediaObject::_saveTempFileAsMediaObject(basename($importfile), $importfile, false); ilObjMediaObject::_saveUsage($media_object->getId(), "qpl:html", $this->object->getId()); diff --git a/components/ILIAS/TestQuestionPool/classes/import/qti12/class.assFileUploadImport.php b/components/ILIAS/TestQuestionPool/classes/import/qti12/class.assFileUploadImport.php index b3ab518f25c4..3f08c77b5e4c 100755 --- a/components/ILIAS/TestQuestionPool/classes/import/qti12/class.assFileUploadImport.php +++ b/components/ILIAS/TestQuestionPool/classes/import/qti12/class.assFileUploadImport.php @@ -64,7 +64,7 @@ public function fromXML( $importfile = $importdirectory . DIRECTORY_SEPARATOR . $mob["uri"]; global $DIC; /* @var ILIAS\DI\Container $DIC */ - $DIC['ilLog']->write(__METHOD__ . ': import mob from dir: ' . $importfile); + $DIC['ilLog']->info('import mob from dir: ' . $importfile); $media_object = ilObjMediaObject::_saveTempFileAsMediaObject(basename($importfile), $importfile, false); ilObjMediaObject::_saveUsage($media_object->getId(), "qpl:html", $this->object->getId()); diff --git a/components/ILIAS/TestQuestionPool/classes/import/qti12/class.assImagemapQuestionImport.php b/components/ILIAS/TestQuestionPool/classes/import/qti12/class.assImagemapQuestionImport.php index 8f907e7a47d2..3e19507abbdc 100755 --- a/components/ILIAS/TestQuestionPool/classes/import/qti12/class.assImagemapQuestionImport.php +++ b/components/ILIAS/TestQuestionPool/classes/import/qti12/class.assImagemapQuestionImport.php @@ -225,7 +225,7 @@ public function fromXML( $importfile = $importdirectory . DIRECTORY_SEPARATOR . $mob["uri"]; global $DIC; /* @var ILIAS\DI\Container $DIC */ - $DIC['ilLog']->write(__METHOD__ . ': import mob from dir: ' . $importfile); + $DIC['ilLog']->info('import mob from dir: ' . $importfile); $media_object = ilObjMediaObject::_saveTempFileAsMediaObject(basename($importfile), $importfile, false); ilObjMediaObject::_saveUsage($media_object->getId(), "qpl:html", $this->object->getId()); diff --git a/components/ILIAS/TestQuestionPool/classes/import/qti12/class.assKprimChoiceImport.php b/components/ILIAS/TestQuestionPool/classes/import/qti12/class.assKprimChoiceImport.php index b714a0897dca..734b1917d099 100755 --- a/components/ILIAS/TestQuestionPool/classes/import/qti12/class.assKprimChoiceImport.php +++ b/components/ILIAS/TestQuestionPool/classes/import/qti12/class.assKprimChoiceImport.php @@ -262,7 +262,7 @@ public function fromXML( $importfile = $importdirectory . DIRECTORY_SEPARATOR . $mob["uri"]; global $DIC; /* @var ILIAS\DI\Container $DIC */ - $DIC['ilLog']->write(__METHOD__ . ': import mob from dir: ' . $importfile); + $DIC['ilLog']->info('import mob from dir: ' . $importfile); $media_object = ilObjMediaObject::_saveTempFileAsMediaObject(basename($importfile), $importfile, false); ilObjMediaObject::_saveUsage($media_object->getId(), "qpl:html", $this->object->getId()); diff --git a/components/ILIAS/TestQuestionPool/classes/import/qti12/class.assLongMenuImport.php b/components/ILIAS/TestQuestionPool/classes/import/qti12/class.assLongMenuImport.php index dd29333867d7..f98757706f54 100755 --- a/components/ILIAS/TestQuestionPool/classes/import/qti12/class.assLongMenuImport.php +++ b/components/ILIAS/TestQuestionPool/classes/import/qti12/class.assLongMenuImport.php @@ -60,7 +60,7 @@ public function fromXML( $importfile = $importdirectory . DIRECTORY_SEPARATOR . $mob["uri"]; global $DIC; /* @var ILIAS\DI\Container $DIC */ - $DIC['ilLog']->write(__METHOD__ . ': import mob from dir: ' . $importfile); + $DIC['ilLog']->info('import mob from dir: ' . $importfile); $media_object = ilObjMediaObject::_saveTempFileAsMediaObject(basename($importfile), $importfile, false); ilObjMediaObject::_saveUsage($media_object->getId(), "qpl:html", $this->object->getId()); diff --git a/components/ILIAS/TestQuestionPool/classes/import/qti12/class.assMatchingQuestionImport.php b/components/ILIAS/TestQuestionPool/classes/import/qti12/class.assMatchingQuestionImport.php index b823953c2e6c..3e7a5946d040 100755 --- a/components/ILIAS/TestQuestionPool/classes/import/qti12/class.assMatchingQuestionImport.php +++ b/components/ILIAS/TestQuestionPool/classes/import/qti12/class.assMatchingQuestionImport.php @@ -263,7 +263,7 @@ public function fromXML( $importfile = $importdirectory . DIRECTORY_SEPARATOR . $mob["uri"]; global $DIC; /* @var ILIAS\DI\Container $DIC */ - $DIC['ilLog']->write(__METHOD__ . ': import mob from dir: ' . $importfile); + $DIC['ilLog']->info('import mob from dir: ' . $importfile); $media_object = ilObjMediaObject::_saveTempFileAsMediaObject(basename($importfile), $importfile, false); ilObjMediaObject::_saveUsage($media_object->getId(), "qpl:html", $this->object->getId()); diff --git a/components/ILIAS/TestQuestionPool/classes/import/qti12/class.assMultipleChoiceImport.php b/components/ILIAS/TestQuestionPool/classes/import/qti12/class.assMultipleChoiceImport.php index 1a299cc2aaec..7b8cb9841dc8 100755 --- a/components/ILIAS/TestQuestionPool/classes/import/qti12/class.assMultipleChoiceImport.php +++ b/components/ILIAS/TestQuestionPool/classes/import/qti12/class.assMultipleChoiceImport.php @@ -270,7 +270,7 @@ public function fromXML( $importfile = $importdirectory . DIRECTORY_SEPARATOR . $mob["uri"]; global $DIC; /* @var ILIAS\DI\Container $DIC */ - $DIC['ilLog']->write(__METHOD__ . ': import mob from dir: ' . $importfile); + $DIC['ilLog']->info('import mob from dir: ' . $importfile); $media_object = ilObjMediaObject::_saveTempFileAsMediaObject(basename($importfile), $importfile, false); ilObjMediaObject::_saveUsage($media_object->getId(), "qpl:html", $this->object->getId()); diff --git a/components/ILIAS/TestQuestionPool/classes/import/qti12/class.assNumericImport.php b/components/ILIAS/TestQuestionPool/classes/import/qti12/class.assNumericImport.php index be1876d868cb..ce1750add09a 100755 --- a/components/ILIAS/TestQuestionPool/classes/import/qti12/class.assNumericImport.php +++ b/components/ILIAS/TestQuestionPool/classes/import/qti12/class.assNumericImport.php @@ -151,7 +151,7 @@ public function fromXML( $importfile = $importdirectory . DIRECTORY_SEPARATOR . $mob["uri"]; global $DIC; /* @var ILIAS\DI\Container $DIC */ - $DIC['ilLog']->write(__METHOD__ . ': import mob from dir: ' . $importfile); + $DIC['ilLog']->info('import mob from dir: ' . $importfile); $media_object = ilObjMediaObject::_saveTempFileAsMediaObject(basename($importfile), $importfile, false); ilObjMediaObject::_saveUsage($media_object->getId(), "qpl:html", $this->object->getId()); diff --git a/components/ILIAS/TestQuestionPool/classes/import/qti12/class.assOrderingHorizontalImport.php b/components/ILIAS/TestQuestionPool/classes/import/qti12/class.assOrderingHorizontalImport.php index 2fe4108cfc1b..94550a37f495 100755 --- a/components/ILIAS/TestQuestionPool/classes/import/qti12/class.assOrderingHorizontalImport.php +++ b/components/ILIAS/TestQuestionPool/classes/import/qti12/class.assOrderingHorizontalImport.php @@ -72,7 +72,7 @@ public function fromXML( $importfile = $importdirectory . DIRECTORY_SEPARATOR . $mob["uri"]; global $DIC; /* @var ILIAS\DI\Container $DIC */ - $DIC['ilLog']->write(__METHOD__ . ': import mob from dir: ' . $importfile); + $DIC['ilLog']->info('import mob from dir: ' . $importfile); $media_object = ilObjMediaObject::_saveTempFileAsMediaObject(basename($importfile), $importfile, false); ilObjMediaObject::_saveUsage($media_object->getId(), "qpl:html", $this->object->getId()); diff --git a/components/ILIAS/TestQuestionPool/classes/import/qti12/class.assOrderingQuestionImport.php b/components/ILIAS/TestQuestionPool/classes/import/qti12/class.assOrderingQuestionImport.php index 62585dc7e0ca..5c1ef72b620b 100755 --- a/components/ILIAS/TestQuestionPool/classes/import/qti12/class.assOrderingQuestionImport.php +++ b/components/ILIAS/TestQuestionPool/classes/import/qti12/class.assOrderingQuestionImport.php @@ -256,7 +256,7 @@ public function fromXML( $importfile = $importdirectory . DIRECTORY_SEPARATOR . $mob['uri']; global $DIC; /* @var ILIAS\DI\Container $DIC */ - $DIC['ilLog']->write(__METHOD__ . ': import mob from dir: ' . $importfile); + $DIC['ilLog']->info('import mob from dir: ' . $importfile); $media_object = ilObjMediaObject::_saveTempFileAsMediaObject(basename($importfile), $importfile, false); ilObjMediaObject::_saveUsage($media_object->getId(), "qpl:html", $this->object->getId()); diff --git a/components/ILIAS/TestQuestionPool/classes/import/qti12/class.assSingleChoiceImport.php b/components/ILIAS/TestQuestionPool/classes/import/qti12/class.assSingleChoiceImport.php index af1b8f86cef1..af1fcdd4ce61 100755 --- a/components/ILIAS/TestQuestionPool/classes/import/qti12/class.assSingleChoiceImport.php +++ b/components/ILIAS/TestQuestionPool/classes/import/qti12/class.assSingleChoiceImport.php @@ -266,7 +266,7 @@ public function fromXML( $importfile = $importdirectory . DIRECTORY_SEPARATOR . $mob["uri"]; global $DIC; /* @var ILIAS\DI\Container $DIC */ - $DIC['ilLog']->write(__METHOD__ . ': import mob from dir: ' . $importfile); + $DIC['ilLog']->info('import mob from dir: ' . $importfile); $media_object = ilObjMediaObject::_saveTempFileAsMediaObject(basename($importfile), $importfile, false); ilObjMediaObject::_saveUsage($media_object->getId(), 'qpl:html', $this->object->getId()); diff --git a/components/ILIAS/TestQuestionPool/classes/import/qti12/class.assTextQuestionImport.php b/components/ILIAS/TestQuestionPool/classes/import/qti12/class.assTextQuestionImport.php index 15addfb54645..3ab40e8be8bc 100755 --- a/components/ILIAS/TestQuestionPool/classes/import/qti12/class.assTextQuestionImport.php +++ b/components/ILIAS/TestQuestionPool/classes/import/qti12/class.assTextQuestionImport.php @@ -176,7 +176,7 @@ public function fromXML( $importfile = $importdirectory . DIRECTORY_SEPARATOR . $mob["uri"]; global $DIC; /* @var ILIAS\DI\Container $DIC */ - $DIC['ilLog']->write(__METHOD__ . ': import mob from dir: ' . $importfile); + $DIC['ilLog']->info('import mob from dir: ' . $importfile); $media_object = ilObjMediaObject::_saveTempFileAsMediaObject(basename($importfile), $importfile, false); ilObjMediaObject::_saveUsage($media_object->getId(), "qpl:html", $this->object->getId()); diff --git a/components/ILIAS/TestQuestionPool/classes/import/qti12/class.assTextSubsetImport.php b/components/ILIAS/TestQuestionPool/classes/import/qti12/class.assTextSubsetImport.php index 9f21b8305fe9..cd21132fb74f 100755 --- a/components/ILIAS/TestQuestionPool/classes/import/qti12/class.assTextSubsetImport.php +++ b/components/ILIAS/TestQuestionPool/classes/import/qti12/class.assTextSubsetImport.php @@ -169,7 +169,7 @@ public function fromXML( $importfile = $importdirectory . DIRECTORY_SEPARATOR . $mob["uri"]; global $DIC; /* @var ILIAS\DI\Container $DIC */ - $DIC['ilLog']->write(__METHOD__ . ': import mob from dir: ' . $importfile); + $DIC['ilLog']->info('import mob from dir: ' . $importfile); $media_object = ilObjMediaObject::_saveTempFileAsMediaObject(basename($importfile), $importfile, false); ilObjMediaObject::_saveUsage($media_object->getId(), "qpl:html", $this->object->getId()); diff --git a/components/ILIAS/User/classes/Cron/class.ilCronDeleteInactiveUserAccounts.php b/components/ILIAS/User/classes/Cron/class.ilCronDeleteInactiveUserAccounts.php index 8940b7f5847e..96300f64c794 100755 --- a/components/ILIAS/User/classes/Cron/class.ilCronDeleteInactiveUserAccounts.php +++ b/components/ILIAS/User/classes/Cron/class.ilCronDeleteInactiveUserAccounts.php @@ -236,7 +236,7 @@ public function run(): JobResult } $this->cron_delete_reminder_mail->removeEntriesFromTableIfLastLoginIsNewer(); - $this->log->write( + $this->log->info( 'CRON - ilCronDeleteInactiveUserAccounts::run(), deleted ' . "=> {$counters[self::ACTION_USER_DELETED]} User(s), sent reminder " . "mail to {$counters[self::ACTION_USER_REMINDER_MAIL_SENT]} User(s)" diff --git a/components/ILIAS/User/classes/Cron/class.ilUserCronCheckAccounts.php b/components/ILIAS/User/classes/Cron/class.ilUserCronCheckAccounts.php index 5a65cf5f6bcf..b6df670a88af 100755 --- a/components/ILIAS/User/classes/Cron/class.ilUserCronCheckAccounts.php +++ b/components/ILIAS/User/classes/Cron/class.ilUserCronCheckAccounts.php @@ -142,7 +142,7 @@ public function run(): JobResult $this->db->query($query); // Send log message - $this->log->write('Cron: (checkUserAccounts()) sent message to ' . $login . '.'); + $this->log->info('Cron: (checkUserAccounts()) sent message to ' . $login . '.'); $this->counter++; } diff --git a/components/ILIAS/Utilities/classes/class.ilUtil.php b/components/ILIAS/Utilities/classes/class.ilUtil.php index 02b2e0cca55d..477e99d9edd4 100755 --- a/components/ILIAS/Utilities/classes/class.ilUtil.php +++ b/components/ILIAS/Utilities/classes/class.ilUtil.php @@ -667,7 +667,7 @@ private static function maskAttributeTag(string $a_str, string $tag, string $tag $a_str ); if ($old_str == $a_str) { - $ilLog->write( + $ilLog->info( "ilUtil::maskA-" . htmlentities($old_str) . " == " . htmlentities($a_str) ); @@ -700,7 +700,7 @@ private static function unmaskAttributeTag(string $a_str, string $tag, string $t $a_str ); if ($old_str == $a_str) { - $ilLog->write( + $ilLog->info( "ilUtil::unmaskA-" . htmlentities($old_str) . " == " . htmlentities($a_str) ); diff --git a/components/ILIAS/VirusScanner/classes/class.ilVirusScanner.php b/components/ILIAS/VirusScanner/classes/class.ilVirusScanner.php index 5a5f5f0c38b2..d31fdd1dbf1c 100644 --- a/components/ILIAS/VirusScanner/classes/class.ilVirusScanner.php +++ b/components/ILIAS/VirusScanner/classes/class.ilVirusScanner.php @@ -152,7 +152,7 @@ public function logScanResult(): void } $mess .= ': ' . preg_replace('/[\r\n]+/', '; ', $this->scanResult); - $this->log->write($mess); + $this->log->info($mess); } protected function removeBufferFile(string $bufferFile): void @@ -188,7 +188,7 @@ public function logCleanResult(): void } $mess .= ': ' . preg_replace('/[\r\n]+/', '; ', $this->cleanResult); - $this->log->write($mess); + $this->log->info($mess); } public function fileCleaned(): bool diff --git a/components/ILIAS/VirusScanner/classes/class.ilVirusScannerClamAV.php b/components/ILIAS/VirusScanner/classes/class.ilVirusScannerClamAV.php index ef509d1f6463..1b1a463f1a98 100644 --- a/components/ILIAS/VirusScanner/classes/class.ilVirusScannerClamAV.php +++ b/components/ILIAS/VirusScanner/classes/class.ilVirusScannerClamAV.php @@ -137,7 +137,7 @@ public function scanFile(string $file_path, string $org_name = ''): string $return_error = 'ERROR (Virus Scanner failed): ' . $this->scanResult . '; Path=' . $a_filepath; - $this->log->write($return_error); + $this->log->info($return_error); return $return_error; } } diff --git a/components/ILIAS/VirusScanner/classes/class.ilVirusScannerSophos.php b/components/ILIAS/VirusScanner/classes/class.ilVirusScannerSophos.php index e56f2afdf482..80cd44d37b5e 100644 --- a/components/ILIAS/VirusScanner/classes/class.ilVirusScannerSophos.php +++ b/components/ILIAS/VirusScanner/classes/class.ilVirusScannerSophos.php @@ -54,7 +54,7 @@ public function scanFile(string $file_path, string $org_name = ''): string } // sophie has failed (probably the daemon doesn't run) - $this->log->write( + $this->log->info( 'ERROR (Virus Scanner failed): ' . $this->scanResult . '; COMMAMD=' . $cmd diff --git a/components/ILIAS/WebDAV/src/Log/Log.php b/components/ILIAS/WebDAV/src/Log/Log.php index 5f7202c0a1a0..0cc0dd8c69f2 100644 --- a/components/ILIAS/WebDAV/src/Log/Log.php +++ b/components/ILIAS/WebDAV/src/Log/Log.php @@ -71,12 +71,12 @@ private function handleException(\Throwable $e): void $called_by = $e->getTrace()[0] ?? null; if ($called_by && isset($called_by['class'], $called_by['function'])) { - $this->logger->write( + $this->logger->info( 'WEBDAV: Exception in ' . $called_by['class'] . '::' . $called_by['function'] . ' - ' . $e->getMessage( ), ); } else { - $this->logger->write( + $this->logger->info( 'WEBDAV: Uncaught exception - ' . $e->getMessage(), ); } diff --git a/components/ILIAS/WebServices/ECS/classes/class.ilECSCategoryMapping.php b/components/ILIAS/WebServices/ECS/classes/class.ilECSCategoryMapping.php index 165fa738a4db..67e3db3a2a1e 100755 --- a/components/ILIAS/WebServices/ECS/classes/class.ilECSCategoryMapping.php +++ b/components/ILIAS/WebServices/ECS/classes/class.ilECSCategoryMapping.php @@ -90,16 +90,16 @@ public static function handleUpdate(int $a_obj_id, int $a_server_id, array $a_ma $exists = true; } } - $logger->info(__METHOD__ . ': Creating/Deleting references...'); + $logger->info('Creating/Deleting references...'); if (!$exists) { - $logger->info(__METHOD__ . ': Add new reference. STEP 1'); + $logger->info('Add new reference. STEP 1'); if ($obj_data = ilObjectFactory::getInstanceByRefId($a_ref_id, false)) { $obj_data->createReference(); $obj_data->putInTree($cat); $obj_data->setPermissions($cat); - $logger->info(__METHOD__ . ': Add new reference.'); + $logger->info('Add new reference.'); } } // Now delete old references @@ -113,7 +113,7 @@ public static function handleUpdate(int $a_obj_id, int $a_server_id, array $a_ma } if ($to_delete = ilObjectFactory::getInstanceByRefId($ref_id)) { $to_delete->delete(); - $logger->write(__METHOD__ . ': Deleted deprecated reference.'); + $logger->info('Deleted deprecated reference.'); } } return true; diff --git a/components/ILIAS/soap/classes/class.ilSoapCourseAdministration.php b/components/ILIAS/soap/classes/class.ilSoapCourseAdministration.php index 25394d1111b2..e7437388c409 100755 --- a/components/ILIAS/soap/classes/class.ilSoapCourseAdministration.php +++ b/components/ILIAS/soap/classes/class.ilSoapCourseAdministration.php @@ -122,7 +122,7 @@ public function deleteCourse(string $sid, int $course_id) return $this->raiseError('Node already deleted', 'Client'); } - $log->write("SOAP ilObjectGUI::confirmedDeleteObject(), moved ref_id " . $course_id . " to trash"); + $log->info("SOAP ilObjectGUI::confirmedDeleteObject(), moved ref_id " . $course_id . " to trash"); return true; } diff --git a/components/ILIAS/soap/classes/class.ilSoapFileAdministration.php b/components/ILIAS/soap/classes/class.ilSoapFileAdministration.php index 0340f4364ac8..eb4f9871971a 100755 --- a/components/ILIAS/soap/classes/class.ilSoapFileAdministration.php +++ b/components/ILIAS/soap/classes/class.ilSoapFileAdministration.php @@ -1,4 +1,5 @@ write(__METHOD__ . ': File type: ' . $file->getFileType()); + $ilLog->info('File type: ' . $file->getFileType()); $file->create(); $file->createReference(); diff --git a/components/ILIAS/soap/classes/class.ilSoapLearningProgressAdministration.php b/components/ILIAS/soap/classes/class.ilSoapLearningProgressAdministration.php index 0ed837f05bc3..a5e52d6cec8a 100755 --- a/components/ILIAS/soap/classes/class.ilSoapLearningProgressAdministration.php +++ b/components/ILIAS/soap/classes/class.ilSoapLearningProgressAdministration.php @@ -426,21 +426,21 @@ protected function applyProgressFilter(int $obj_id, array $usr_ids, array $filte } if (!$filter || in_array(self::PROGRESS_FILTER_ALL, $filter)) { - $GLOBALS['DIC']['log']->write(__METHOD__ . ': Deleting all progress data'); + $GLOBALS['DIC']['log']->info('Deleting all progress data'); return $all_users; } $filter_users = array(); if (in_array(self::PROGRESS_FILTER_IN_PROGRESS, $filter)) { - $GLOBALS['DIC']['log']->write(__METHOD__ . ': Filtering in progress.'); + $GLOBALS['DIC']['log']->info('Filtering in progress.'); $filter_users = array_merge($filter, ilLPStatusWrapper::_getInProgress($obj_id)); } if (in_array(self::PROGRESS_FILTER_COMPLETED, $filter)) { - $GLOBALS['DIC']['log']->write(__METHOD__ . ': Filtering completed.'); + $GLOBALS['DIC']['log']->info('Filtering completed.'); $filter_users = array_merge($filter, ilLPStatusWrapper::_getCompleted($obj_id)); } if (in_array(self::PROGRESS_FILTER_FAILED, $filter)) { - $GLOBALS['DIC']['log']->write(__METHOD__ . ': Filtering failed.'); + $GLOBALS['DIC']['log']->info('Filtering failed.'); $filter_users = array_merge($filter, ilLPStatusWrapper::_getFailed($obj_id)); } diff --git a/components/ILIAS/soap/classes/class.ilSoapObjectAdministration.php b/components/ILIAS/soap/classes/class.ilSoapObjectAdministration.php index 4c09817df2dc..2e737779a847 100755 --- a/components/ILIAS/soap/classes/class.ilSoapObjectAdministration.php +++ b/components/ILIAS/soap/classes/class.ilSoapObjectAdministration.php @@ -47,7 +47,7 @@ public function getObjIdByImportId(string $sid, string $import_id) $ilLog = $DIC['ilLog']; $obj_id = ilObject::_lookupObjIdByImportId($import_id); - $ilLog->write("SOAP getObjIdByImportId(): import_id = " . $import_id . ' obj_id = ' . $obj_id); + $ilLog->info("SOAP getObjIdByImportId(): import_id = " . $import_id . ' obj_id = ' . $obj_id); return $obj_id ?: "0"; } @@ -883,7 +883,7 @@ public function removeFromSystemByImportId(string $sid, string $import_id) $subtree_nodes = $tree->getSubtree($node_data); foreach ($subtree_nodes as $node) { - $ilLog->write('Soap: removeFromSystemByImportId(). Deleting object with title id: ' . $node['title']); + $ilLog->info('Soap: removeFromSystemByImportId(). Deleting object with title id: ' . $node['title']); $tmp_obj = ilObjectFactory::getInstanceByRefId($node['ref_id']); if (!is_object($tmp_obj)) { return $this->raiseError( @@ -1371,17 +1371,17 @@ private function updateReferences(array $a_object_data): void switch ($ref_data['time_target']['timing_type']) { case ilObjectXMLWriter::TIMING_DEACTIVATED: - $ilLog->write(__METHOD__ . ilObjectActivation::TIMINGS_DEACTIVATED . ' ' . $ref_data['time_target']['timing_type']); + $ilLog->info(ilObjectActivation::TIMINGS_DEACTIVATED . ' ' . $ref_data['time_target']['timing_type']); $items->setTimingType(ilObjectActivation::TIMINGS_DEACTIVATED); break; case ilObjectXMLWriter::TIMING_TEMPORARILY_AVAILABLE: - $ilLog->write(__METHOD__ . ilObjectActivation::TIMINGS_ACTIVATION . ' ' . $ref_data['time_target']['timing_type']); + $ilLog->info(ilObjectActivation::TIMINGS_ACTIVATION . ' ' . $ref_data['time_target']['timing_type']); $items->setTimingType(ilObjectActivation::TIMINGS_ACTIVATION); break; case ilObjectXMLWriter::TIMING_PRESETTING: - $ilLog->write(__METHOD__ . ilObjectActivation::TIMINGS_PRESETTING . ' ' . $ref_data['time_target']['timing_type']); + $ilLog->info(ilObjectActivation::TIMINGS_PRESETTING . ' ' . $ref_data['time_target']['timing_type']); $items->setTimingType(ilObjectActivation::TIMINGS_PRESETTING); break; } @@ -1429,17 +1429,17 @@ private function addReferences(ilObject $source, array $a_object_data): void switch ($ref_data['time_target']['timing_type']) { case ilObjectXMLWriter::TIMING_DEACTIVATED: - $ilLog->write(__METHOD__ . ilObjectActivation::TIMINGS_DEACTIVATED . ' ' . $ref_data['time_target']['timing_type']); + $ilLog->info(ilObjectActivation::TIMINGS_DEACTIVATED . ' ' . $ref_data['time_target']['timing_type']); $items->setTimingType(ilObjectActivation::TIMINGS_DEACTIVATED); break; case ilObjectXMLWriter::TIMING_TEMPORARILY_AVAILABLE: - $ilLog->write(__METHOD__ . ilObjectActivation::TIMINGS_ACTIVATION . ' ' . $ref_data['time_target']['timing_type']); + $ilLog->info(ilObjectActivation::TIMINGS_ACTIVATION . ' ' . $ref_data['time_target']['timing_type']); $items->setTimingType(ilObjectActivation::TIMINGS_ACTIVATION); break; case ilObjectXMLWriter::TIMING_PRESETTING: - $ilLog->write(__METHOD__ . ilObjectActivation::TIMINGS_PRESETTING . ' ' . $ref_data['time_target']['timing_type']); + $ilLog->info(ilObjectActivation::TIMINGS_PRESETTING . ' ' . $ref_data['time_target']['timing_type']); $items->setTimingType(ilObjectActivation::TIMINGS_PRESETTING); break; } diff --git a/components/ILIAS/soap/classes/class.ilSoapUserAdministration.php b/components/ILIAS/soap/classes/class.ilSoapUserAdministration.php index 238d15ac8898..caff63a743f4 100755 --- a/components/ILIAS/soap/classes/class.ilSoapUserAdministration.php +++ b/components/ILIAS/soap/classes/class.ilSoapUserAdministration.php @@ -348,37 +348,37 @@ protected function isPermittedRole(int $a_folder, int $a_role) // global role if ($location == ROLE_FOLDER_ID) { - $ilLog->write(__METHOD__ . ': Check global role'); + $ilLog->info('Check global role'); // check assignment permission if called from local admin if ($a_folder !== self::USER_FOLDER_ID && $a_folder !== 0) { - $ilLog->write(__METHOD__ . ': ' . $a_folder); + $ilLog->info($a_folder); if (!ilObjRole::_getAssignUsersStatus($a_role)) { - $ilLog->write(__METHOD__ . ': No assignment allowed'); + $ilLog->info('No assignment allowed'); $checked_roles[$a_role] = false; return false; } } // exclude anonymous role from list if ($a_role === ANONYMOUS_ROLE_ID) { - $ilLog->write(__METHOD__ . ': Anonymous role chosen.'); + $ilLog->info('Anonymous role chosen.'); $checked_roles[$a_role] = false; return false; } // do not allow to assign users to administrator role if current user does not has SYSTEM_ROLE_ID if ($a_role === SYSTEM_ROLE_ID && !in_array(SYSTEM_ROLE_ID, $rbacreview->assignedRoles($ilUser->getId()), true)) { - $ilLog->write(__METHOD__ . ': System role assignment forbidden.'); + $ilLog->info('System role assignment forbidden.'); $checked_roles[$a_role] = false; return false; } // Global role assignment ok - $ilLog->write(__METHOD__ . ': Assignment allowed.'); + $ilLog->info('Assignment allowed.'); $checked_roles[$a_role] = true; return true; } elseif ($location) { - $ilLog->write(__METHOD__ . ': Check local role.'); + $ilLog->info('Check local role.'); // It's a local role $rolfs = $rbacreview->getFoldersAssignedToRole($a_role, true); @@ -390,7 +390,7 @@ protected function isPermittedRole(int $a_folder, int $a_role) // (The ROLE_FOLDER_ID folder contains the global roles). if ($rbacreview->isDeleted($rolf) || !$rbacsystem->checkAccess('edit_permission', $rolf)) { - $ilLog->write(__METHOD__ . ': Role deleted or no permission.'); + $ilLog->info('Role deleted or no permission.'); $checked_roles[$a_role] = false; return false; } @@ -403,11 +403,11 @@ protected function isPermittedRole(int $a_folder, int $a_role) // with false, and only set to true if we find the object id of the // locally administrated category in the tree path to the local role. if ($a_folder !== self::USER_FOLDER_ID && $a_folder !== 0 && !$tree->isGrandChild($a_folder, $rolf)) { - $ilLog->write(__METHOD__ . ': Not in path of category.'); + $ilLog->info('Not in path of category.'); $checked_roles[$a_role] = false; return false; } - $ilLog->write(__METHOD__ . ': Assignment allowed.'); + $ilLog->info('Assignment allowed.'); $checked_roles[$a_role] = true; return true; } From 5a46d9358e249ae1da35e65553f6fc454f516c0f Mon Sep 17 00:00:00 2001 From: Tim Schmitz Date: Mon, 3 Aug 2026 15:15:04 +0200 Subject: [PATCH 4/4] abandon root logger --- .../classes/class.ilAdministrationGUI.php | 2 +- .../class.ilShibbolethRoleAssignmentRules.php | 4 ++-- .../DependencyMap/BaseDependencyMap.php | 2 +- .../ILIAS/Badge/classes/class.ilBadge.php | 2 +- .../class.ilObjCertificateSettingsGUI.php | 2 +- .../classes/class.ilChatroomExporter.php | 2 +- .../class.ilCmiXapiVerificationTableGUI.php | 2 +- .../class.ilObjCmiXapiVerificationGUI.php | 2 +- .../classes/class.ilCmiXapiSettingsGUI.php | 2 +- .../Export/class.ilContainerExporter.php | 2 +- .../class.ilContainerReferenceExporter.php | 4 ++-- .../class.ilContainerReferenceImporter.php | 2 +- .../class.ilCourseVerificationTableGUI.php | 2 +- .../class.ilObjCourseVerificationGUI.php | 2 +- components/ILIAS/DI/src/LoggingServices.php | 8 ++----- .../classes/class.ilDashboardBlockGUI.php | 2 +- .../Content/class.ilDclContentExporter.php | 6 ++--- .../ILIAS/Database/classes/ilDBGenerator.php | 4 ++-- .../class.ilExerciseVerificationTableGUI.php | 2 +- .../classes/class.ilObjExerciseGUI.php | 2 +- .../class.ilObjExerciseVerificationGUI.php | 2 +- .../Export/classes/ImportHandler/Factory.php | 2 +- .../class.ilFileSystemCleanTempDirCron.php | 2 +- .../ILIAS/Forum/classes/class.ilObjForum.php | 2 +- .../class.ilGroupParticipantsTableGUI.php | 2 -- .../Init/classes/class.ilInitialisation.php | 2 +- components/ILIAS/Init/resources/ilias.php | 4 ++-- ...lass.ilLTIConsumerVerificationTableGUI.php | 2 +- .../class.ilObjLTIConsumerVerificationGUI.php | 2 +- .../class.ilLTIConsumerGradeServiceScores.php | 2 +- .../classes/class.ilLTIConsumerResult.php | 6 ++--- .../class.ilLTIConsumerResultService.php | 4 ++-- .../classes/class.ilObjLTIConsumer.php | 2 +- .../CustomBreadcrumbPagePartProvider.php | 2 +- .../classes/class.ilLTIAppEventListener.php | 2 +- .../Language/classes/class.ilLanguage.php | 2 +- .../classes/class.ilObjLanguageExt.php | 2 +- .../class.ilLearningSequenceParticipants.php | 2 +- .../classes/class.ilLSLocalDI.php | 2 +- .../class.ilLearningSequenceImporter.php | 2 +- .../classes/class.ilObjLearningSequence.php | 2 +- .../class.ilObjLearningSequenceGUI.php | 2 +- .../classes/public/class.ilLoggerFactory.php | 9 -------- .../classes/ilNotificationPushHandler.php | 2 +- .../Deletion/EventStandardAdapter.php | 2 +- .../SCORM/class.ilSCORMPresentationGUI.php | 2 +- .../class.ilObjSCORMVerificationGUI.php | 2 +- .../class.ilSCORMVerificationTableGUI.php | 2 +- .../ILIAS/Test/classes/class.ilObjTest.php | 2 +- .../class.ilObjTestVerificationGUI.php | 4 ++-- .../classes/class.assImagemapQuestion.php | 2 +- .../classes/class.assMatchingQuestion.php | 8 +++---- .../classes/class.assOrderingQuestion.php | 4 ++-- .../classes/class.assQuestion.php | 22 +++++++++---------- .../class.ilAssFileUploadUploadsExporter.php | 2 +- .../classes/class.ilImagemapPreview.php | 2 +- ...ManipulateImagesInChoiceQuestionsTrait.php | 4 ++-- .../src/Account/class.DeleteAccountGUI.php | 2 +- .../Utilities/classes/class.ilShellUtil.php | 2 +- .../classes/class.ilVirusScanner.php | 2 +- .../classes/class.ilVirusScannerFactory.php | 2 +- 61 files changed, 85 insertions(+), 100 deletions(-) diff --git a/components/ILIAS/Administration/classes/class.ilAdministrationGUI.php b/components/ILIAS/Administration/classes/class.ilAdministrationGUI.php index 8dcfdcc5c0ef..53510739eba5 100755 --- a/components/ILIAS/Administration/classes/class.ilAdministrationGUI.php +++ b/components/ILIAS/Administration/classes/class.ilAdministrationGUI.php @@ -87,7 +87,7 @@ public function __construct() global $DIC; $this->help = $DIC["ilHelp"]; - $this->logger = $DIC->logger()->root(); + $this->logger = $DIC->logger()->forComponent('adms'); $this->lng = $DIC->language(); $this->tpl = $DIC->ui()->mainTemplate(); $this->tree = $DIC->repositoryTree(); diff --git a/components/ILIAS/AuthShibboleth/classes/class.ilShibbolethRoleAssignmentRules.php b/components/ILIAS/AuthShibboleth/classes/class.ilShibbolethRoleAssignmentRules.php index 77d9e5a07767..47603d6ea81d 100755 --- a/components/ILIAS/AuthShibboleth/classes/class.ilShibbolethRoleAssignmentRules.php +++ b/components/ILIAS/AuthShibboleth/classes/class.ilShibbolethRoleAssignmentRules.php @@ -64,7 +64,7 @@ public static function updateAssignments(int $a_usr_id, array $a_data): bool $db = $DIC->database(); $rbac_admin = $DIC->rbac()->admin(); $rbac_review = $DIC->rbac()->review(); - $logger = $DIC->logger()->root(); + $logger = $DIC->logger()->forComponent('shiba'); $query = "SELECT rule_id,add_on_update,remove_on_update FROM shib_role_assignment " . "WHERE add_on_update = 1 OR remove_on_update = 1"; $res = $db->query($query); while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) { @@ -95,7 +95,7 @@ public static function doAssignments(int $a_usr_id, array $a_data): bool global $DIC; $db = $DIC->database(); $rbac_admin = $DIC->rbac()->admin(); - $logger = $DIC->logger()->root(); + $logger = $DIC->logger()->forComponent('shiba'); $query = "SELECT rule_id,add_on_update FROM shib_role_assignment WHERE add_on_update = 1"; $num_matches = 0; $res = $db->query($query); diff --git a/components/ILIAS/BackgroundTasks/src/Dependencies/DependencyMap/BaseDependencyMap.php b/components/ILIAS/BackgroundTasks/src/Dependencies/DependencyMap/BaseDependencyMap.php index 2bf7e028d3f2..46f64f1461d0 100755 --- a/components/ILIAS/BackgroundTasks/src/Dependencies/DependencyMap/BaseDependencyMap.php +++ b/components/ILIAS/BackgroundTasks/src/Dependencies/DependencyMap/BaseDependencyMap.php @@ -65,7 +65,7 @@ protected function resolveBaseDependencies(Container $DIC, $fullyQualifiedDomain case \ilLoggerFactory::class: return $DIC["ilLoggerFactory"]; case \ilLogger::class: - return $DIC->logger()->root(); + return $DIC->logger()->forComponent('bgtk'); case \ilToolbarGUI::class: return $DIC->toolbar(); case \ilTabsGUI::class: diff --git a/components/ILIAS/Badge/classes/class.ilBadge.php b/components/ILIAS/Badge/classes/class.ilBadge.php index 7ae5afe3942a..d18cc9b5e37c 100755 --- a/components/ILIAS/Badge/classes/class.ilBadge.php +++ b/components/ILIAS/Badge/classes/class.ilBadge.php @@ -51,7 +51,7 @@ public function __construct( $this->db = $container->database(); $this->resource_storage = $container->resourceStorage(); - $this->log = $container->logger()->root(); + $this->log = $container->logger()->forComponent('badge'); if ($a_id) { $this->read($a_id); } diff --git a/components/ILIAS/Certificate/classes/class.ilObjCertificateSettingsGUI.php b/components/ILIAS/Certificate/classes/class.ilObjCertificateSettingsGUI.php index 82f51ac7a054..d7252bcbe240 100755 --- a/components/ILIAS/Certificate/classes/class.ilObjCertificateSettingsGUI.php +++ b/components/ILIAS/Certificate/classes/class.ilObjCertificateSettingsGUI.php @@ -61,7 +61,7 @@ public function __construct( $this->httpState = $DIC->http(); $this->upload = $DIC->upload(); - $this->logger = $DIC->logger()->root(); + $this->logger = $DIC->logger()->forComponent('cert'); $this->type = 'cert'; $this->lng->loadLanguageModule('certificate'); $this->lng->loadLanguageModule('cert'); diff --git a/components/ILIAS/Chatroom/classes/class.ilChatroomExporter.php b/components/ILIAS/Chatroom/classes/class.ilChatroomExporter.php index 9cc57e00299b..d20194d1e04a 100755 --- a/components/ILIAS/Chatroom/classes/class.ilChatroomExporter.php +++ b/components/ILIAS/Chatroom/classes/class.ilChatroomExporter.php @@ -31,7 +31,7 @@ public function getXmlRepresentation(string $a_entity, string $a_schema_version, { $chat = ilObjectFactory::getInstanceByObjId((int) $a_id, false); if (!($chat instanceof ilObjChatroom)) { - $GLOBALS['DIC']->logger()->root()->warning( + $GLOBALS['DIC']->logger()->forComponent('chtr')->warning( $a_id . ' is not id of chatroom instance. Skipped generation of export XML.' ); return ''; diff --git a/components/ILIAS/CmiXapi/classes/Verification/class.ilCmiXapiVerificationTableGUI.php b/components/ILIAS/CmiXapi/classes/Verification/class.ilCmiXapiVerificationTableGUI.php index bbc34b3f9afb..8cb847c3546c 100755 --- a/components/ILIAS/CmiXapi/classes/Verification/class.ilCmiXapiVerificationTableGUI.php +++ b/components/ILIAS/CmiXapi/classes/Verification/class.ilCmiXapiVerificationTableGUI.php @@ -59,7 +59,7 @@ protected function getItems(): void $userCertificateRepository = new ilUserCertificateRepository( $DIC->database(), - $DIC->logger()->root() + $DIC->logger()->forComponent('cmix') ); $certificateArray = $userCertificateRepository->fetchActiveCertificatesByTypeForPresentation( diff --git a/components/ILIAS/CmiXapi/classes/Verification/class.ilObjCmiXapiVerificationGUI.php b/components/ILIAS/CmiXapi/classes/Verification/class.ilObjCmiXapiVerificationGUI.php index cea531b41254..8df4a9eea6e1 100755 --- a/components/ILIAS/CmiXapi/classes/Verification/class.ilObjCmiXapiVerificationGUI.php +++ b/components/ILIAS/CmiXapi/classes/Verification/class.ilObjCmiXapiVerificationGUI.php @@ -63,7 +63,7 @@ public function save(): void $certificateVerificationFileService = new ilCertificateVerificationFileService( $DIC->language(), $DIC->database(), - $DIC->logger()->root(), + $DIC->logger()->forComponent('cmix'), new ilCertificateVerificationClassMap() ); diff --git a/components/ILIAS/CmiXapi/classes/class.ilCmiXapiSettingsGUI.php b/components/ILIAS/CmiXapi/classes/class.ilCmiXapiSettingsGUI.php index aed7fc2b07c2..7dff90c51a9d 100755 --- a/components/ILIAS/CmiXapi/classes/class.ilCmiXapiSettingsGUI.php +++ b/components/ILIAS/CmiXapi/classes/class.ilCmiXapiSettingsGUI.php @@ -692,7 +692,7 @@ protected function deliverCertificateCmd(): void $repository = new ilUserCertificateRepository(); - $certLogger = $this->dic->logger()->root();//->cert(); + $certLogger = $this->dic->logger()->forComponent('cmix');//->cert(); $pdfGenerator = new ilPdfGenerator($repository); $pdfAction = new ilCertificatePdfAction( diff --git a/components/ILIAS/Container/Export/class.ilContainerExporter.php b/components/ILIAS/Container/Export/class.ilContainerExporter.php index 08ae9943a2a5..e32627aa71b3 100755 --- a/components/ILIAS/Container/Export/class.ilContainerExporter.php +++ b/components/ILIAS/Container/Export/class.ilContainerExporter.php @@ -124,7 +124,7 @@ public function getXmlRepresentation(string $a_entity, string $a_schema_version, { global $DIC; - $log = $DIC->logger()->root(); + $log = $DIC->logger()->forComponent('exp'); if ($a_entity === 'struct') { $log->debug(__METHOD__ . ': Received id = ' . $a_id); $ref_ids = ilObject::_getAllReferences((int) $a_id); diff --git a/components/ILIAS/ContainerReference/classes/class.ilContainerReferenceExporter.php b/components/ILIAS/ContainerReference/classes/class.ilContainerReferenceExporter.php index f7b8adf25e6c..98068174496d 100755 --- a/components/ILIAS/ContainerReference/classes/class.ilContainerReferenceExporter.php +++ b/components/ILIAS/ContainerReference/classes/class.ilContainerReferenceExporter.php @@ -29,7 +29,7 @@ public function getXmlExportHeadDependencies(string $a_entity, string $a_target_ { global $DIC; - $log = $DIC->logger()->root(); + $log = $DIC->logger()->forComponent('cont'); $eo = ilExportOptions::getInstance(); @@ -57,7 +57,7 @@ public function getXmlRepresentation(string $a_entity, string $a_schema_version, { global $DIC; - $log = $DIC->logger()->root(); + $log = $DIC->logger()->forComponent('cont'); $refs = ilObject::_getAllReferences((int) $a_id); $ref_ref_id = end($refs); diff --git a/components/ILIAS/ContainerReference/classes/class.ilContainerReferenceImporter.php b/components/ILIAS/ContainerReference/classes/class.ilContainerReferenceImporter.php index 1d02d7d53694..6aacd1c95bd4 100755 --- a/components/ILIAS/ContainerReference/classes/class.ilContainerReferenceImporter.php +++ b/components/ILIAS/ContainerReference/classes/class.ilContainerReferenceImporter.php @@ -59,7 +59,7 @@ public function importXmlRepresentation( global $DIC; $objDefinition = $DIC["objDefinition"]; - $log = $DIC->logger()->root(); + $log = $DIC->logger()->forComponent('cntr'); if ($new_id = $a_mapping->getMapping('components/ILIAS/Container', 'objs', $a_id)) { $refs = ilObject::_getAllReferences((int) $new_id); diff --git a/components/ILIAS/Course/classes/Verification/class.ilCourseVerificationTableGUI.php b/components/ILIAS/Course/classes/Verification/class.ilCourseVerificationTableGUI.php index 47c462a50f16..d7248cb34235 100755 --- a/components/ILIAS/Course/classes/Verification/class.ilCourseVerificationTableGUI.php +++ b/components/ILIAS/Course/classes/Verification/class.ilCourseVerificationTableGUI.php @@ -39,7 +39,7 @@ public function __construct( $this->dic = $DIC; $database = $DIC->database(); - $logger = $DIC->logger()->root(); + $logger = $DIC->logger()->forComponent('crs'); if (null === $userCertificateRepository) { $userCertificateRepository = new ilUserCertificateRepository($database, $logger); diff --git a/components/ILIAS/Course/classes/Verification/class.ilObjCourseVerificationGUI.php b/components/ILIAS/Course/classes/Verification/class.ilObjCourseVerificationGUI.php index 1047be5000c8..04c90d2ed77a 100755 --- a/components/ILIAS/Course/classes/Verification/class.ilObjCourseVerificationGUI.php +++ b/components/ILIAS/Course/classes/Verification/class.ilObjCourseVerificationGUI.php @@ -69,7 +69,7 @@ public function save(): void $certificateVerificationFileService = new ilCertificateVerificationFileService( $this->dic->language(), $this->dic->database(), - $this->dic->logger()->root(), + $this->dic->logger()->forComponent('crs'), new ilCertificateVerificationClassMap() ); diff --git a/components/ILIAS/DI/src/LoggingServices.php b/components/ILIAS/DI/src/LoggingServices.php index 99988d8935b2..43540de3df94 100755 --- a/components/ILIAS/DI/src/LoggingServices.php +++ b/components/ILIAS/DI/src/LoggingServices.php @@ -30,13 +30,9 @@ public function __construct(Container $container) $this->container = $container; } - /** - * Get interface to the global logger. - * @return \ilLogger - */ - public function root() + public function forComponent(string $component_id): \ilLogger { - return $this->container["ilLoggerFactory"]->getRootLogger(); + return $this->container["ilLoggerFactory"]->getComponentLogger($component_id); } /** diff --git a/components/ILIAS/Dashboard/Block/classes/class.ilDashboardBlockGUI.php b/components/ILIAS/Dashboard/Block/classes/class.ilDashboardBlockGUI.php index 549680756ef5..5fd450527f2c 100755 --- a/components/ILIAS/Dashboard/Block/classes/class.ilDashboardBlockGUI.php +++ b/components/ILIAS/Dashboard/Block/classes/class.ilDashboardBlockGUI.php @@ -57,7 +57,7 @@ public function __construct() global $DIC; $this->http = $DIC->http(); $this->refinery = $DIC->refinery(); - $this->logging = $DIC->logger()->root(); + $this->logging = $DIC->logger()->forComponent('dash'); $this->settings = $DIC->settings(); $this->object_cache = $DIC['ilObjDataCache']; $this->tree = $DIC->repositoryTree(); diff --git a/components/ILIAS/DataCollection/classes/Content/class.ilDclContentExporter.php b/components/ILIAS/DataCollection/classes/Content/class.ilDclContentExporter.php index a5fc5c9ea5e7..df7d46d0ec08 100755 --- a/components/ILIAS/DataCollection/classes/Content/class.ilDclContentExporter.php +++ b/components/ILIAS/DataCollection/classes/Content/class.ilDclContentExporter.php @@ -172,15 +172,15 @@ public function exportAsync(string $format = self::EXPORT_EXCEL, ?string $filepa $soap_client->setResponseTimeout(5); $soap_client->enableWSDL(true); - $DIC->logger()->root()->info('Trying to call Soap client...'); + $DIC->logger()->forComponent('dcl')->info('Trying to call Soap client...'); array_unshift($soap_params, $new_session_id . '::' . $client_id); if ($soap_client->init()) { - $DIC->logger()->root()->info('Calling soap ' . $method . ' method with params ' . print_r($soap_params, true)); + $DIC->logger()->forComponent('dcl')->info('Calling soap ' . $method . ' method with params ' . print_r($soap_params, true)); $res = $soap_client->call($method, $soap_params); } else { - $DIC->logger()->root()->warning('SOAP clone call failed. Calling clone method manually'); + $DIC->logger()->forComponent('dcl')->warning('SOAP clone call failed. Calling clone method manually'); if (method_exists('ilSoapFunctions', $method)) { $res = ilSoapFunctions::$method( $new_session_id . '::' . $client_id, diff --git a/components/ILIAS/Database/classes/ilDBGenerator.php b/components/ILIAS/Database/classes/ilDBGenerator.php index 25fdf07d91f4..2b4673fe5127 100755 --- a/components/ILIAS/Database/classes/ilDBGenerator.php +++ b/components/ILIAS/Database/classes/ilDBGenerator.php @@ -488,7 +488,7 @@ public function buildSingularSequenceStatement($file_handle = null): void public function buildInsertStatement(string $a_table, string $a_basedir): bool { global $DIC; - $ilLogger = $DIC->logger()->root(); + $ilLogger = $DIC->logger()->forComponent('db'); $ilLogger->log('Starting export of:' . $a_table); @@ -581,7 +581,7 @@ public function buildInsertStatements(string $a_table, $file_handle = null): voi protected function shortenText(string $table, string $field, string $a_value, int $a_size): string { global $DIC; - $ilLogger = $DIC->logger()->root(); + $ilLogger = $DIC->logger()->forComponent('db'); if ($this->getTargetEncoding() === 'UTF-8') { return $a_value; diff --git a/components/ILIAS/Exercise/classes/class.ilExerciseVerificationTableGUI.php b/components/ILIAS/Exercise/classes/class.ilExerciseVerificationTableGUI.php index 66ae2409044c..2319c7e9db3d 100755 --- a/components/ILIAS/Exercise/classes/class.ilExerciseVerificationTableGUI.php +++ b/components/ILIAS/Exercise/classes/class.ilExerciseVerificationTableGUI.php @@ -37,7 +37,7 @@ public function __construct( $this->user = $DIC->user(); $database = $DIC->database(); - $logger = $DIC->logger()->root(); + $logger = $DIC->logger()->forComponent('exc'); $ilCtrl = $DIC->ctrl(); if (null === $userCertificateRepository) { diff --git a/components/ILIAS/Exercise/classes/class.ilObjExerciseGUI.php b/components/ILIAS/Exercise/classes/class.ilObjExerciseGUI.php index ffaf0cdee8ee..95f594ee1430 100755 --- a/components/ILIAS/Exercise/classes/class.ilObjExerciseGUI.php +++ b/components/ILIAS/Exercise/classes/class.ilObjExerciseGUI.php @@ -1000,7 +1000,7 @@ public function outCertificateObject(): void global $DIC; $database = $DIC->database(); - $logger = $DIC->logger()->root(); + $logger = $DIC->logger()->forComponent('exc'); $ilUser = $this->user; diff --git a/components/ILIAS/Exercise/classes/class.ilObjExerciseVerificationGUI.php b/components/ILIAS/Exercise/classes/class.ilObjExerciseVerificationGUI.php index 65788d585839..98a4c81b30b4 100755 --- a/components/ILIAS/Exercise/classes/class.ilObjExerciseVerificationGUI.php +++ b/components/ILIAS/Exercise/classes/class.ilObjExerciseVerificationGUI.php @@ -60,7 +60,7 @@ public function save(): void $certificateVerificationFileService = new ilCertificateVerificationFileService( $DIC->language(), $DIC->database(), - $DIC->logger()->root(), + $DIC->logger()->forComponent('exc'), new ilCertificateVerificationClassMap() ); diff --git a/components/ILIAS/Export/classes/ImportHandler/Factory.php b/components/ILIAS/Export/classes/ImportHandler/Factory.php index 31b45308b8af..3b0f4be4456f 100755 --- a/components/ILIAS/Export/classes/ImportHandler/Factory.php +++ b/components/ILIAS/Export/classes/ImportHandler/Factory.php @@ -50,7 +50,7 @@ class Factory implements ImportHandlerFactoryInterface public function __construct() { global $DIC; - $this->logger = $DIC->logger()->root(); + $this->logger = $DIC->logger()->forComponent('exp'); $this->lng = $DIC->language(); $this->lng->loadLanguageModule("exp"); $this->import_status_factory = new ImportStatusFactory(); diff --git a/components/ILIAS/Filesystem/classes/class.ilFileSystemCleanTempDirCron.php b/components/ILIAS/Filesystem/classes/class.ilFileSystemCleanTempDirCron.php index 0b10cad78fa9..4bc9cd16b125 100755 --- a/components/ILIAS/Filesystem/classes/class.ilFileSystemCleanTempDirCron.php +++ b/components/ILIAS/Filesystem/classes/class.ilFileSystemCleanTempDirCron.php @@ -52,7 +52,7 @@ public function __construct() $this->filesystem = $DIC->filesystem()->temp(); } if ($DIC->offsetExists('ilLoggerFactory')) { - $this->logger = $DIC->logger()->root(); + $this->logger = $DIC->logger()->forComponent('filesys'); } } diff --git a/components/ILIAS/Forum/classes/class.ilObjForum.php b/components/ILIAS/Forum/classes/class.ilObjForum.php index a1fbe2de93ca..2828fb8287f3 100755 --- a/components/ILIAS/Forum/classes/class.ilObjForum.php +++ b/components/ILIAS/Forum/classes/class.ilObjForum.php @@ -46,7 +46,7 @@ public function __construct(int $a_id = 0, bool $a_call_by_reference = true) parent::__construct($a_id, $a_call_by_reference); $this->rbac = $DIC->rbac(); - $this->logger = $DIC->logger()->root(); + $this->logger = $DIC->logger()->forComponent('frm'); $this->settings = $DIC->settings(); $this->Forum = new ilForum(); diff --git a/components/ILIAS/Group/classes/class.ilGroupParticipantsTableGUI.php b/components/ILIAS/Group/classes/class.ilGroupParticipantsTableGUI.php index ae470dd71c7a..52d446020b06 100755 --- a/components/ILIAS/Group/classes/class.ilGroupParticipantsTableGUI.php +++ b/components/ILIAS/Group/classes/class.ilGroupParticipantsTableGUI.php @@ -352,8 +352,6 @@ public function parse(): void // Custom user data fields if ($udf_ids) { - global $DIC; - $DIC->logger()->root()->dump($filtered_user_ids); $a_user_data = array_reduce( iterator_to_array($this->profile->getDataForMultiple($filtered_user_ids)), function (array $c, ProfileData $v) use ($udf_ids): array { diff --git a/components/ILIAS/Init/classes/class.ilInitialisation.php b/components/ILIAS/Init/classes/class.ilInitialisation.php index 91086a1e0e2e..45f200eba523 100755 --- a/components/ILIAS/Init/classes/class.ilInitialisation.php +++ b/components/ILIAS/Init/classes/class.ilInitialisation.php @@ -1075,7 +1075,7 @@ protected static function initAccessHandling(): void */ protected static function initLog(): void { - $log = ilLoggerFactory::getRootLogger(); + $log = ilLoggerFactory::getLogger('legacy_root'); self::initGlobal("ilLog", $log); // deprecated diff --git a/components/ILIAS/Init/resources/ilias.php b/components/ILIAS/Init/resources/ilias.php index 45cf471b2a4e..97c7e246e19e 100644 --- a/components/ILIAS/Init/resources/ilias.php +++ b/components/ILIAS/Init/resources/ilias.php @@ -42,8 +42,8 @@ throw $e; } - $DIC->logger()->root()->error($e->getMessage()); - $DIC->logger()->root()->error($e->getTraceAsString()); + $DIC->logger()->forComponent('init')->error($e->getMessage()); + $DIC->logger()->forComponent('init')->error($e->getTraceAsString()); $DIC->language()->loadLanguageModule('error'); $df = new DataFactory(); diff --git a/components/ILIAS/LTIConsumer/classes/Verification/class.ilLTIConsumerVerificationTableGUI.php b/components/ILIAS/LTIConsumer/classes/Verification/class.ilLTIConsumerVerificationTableGUI.php index fb3875699e67..b75cfcc0e701 100755 --- a/components/ILIAS/LTIConsumer/classes/Verification/class.ilLTIConsumerVerificationTableGUI.php +++ b/components/ILIAS/LTIConsumer/classes/Verification/class.ilLTIConsumerVerificationTableGUI.php @@ -61,7 +61,7 @@ protected function getItems(): void $userCertificateRepository = new ilUserCertificateRepository( $DIC->database(), - $DIC->logger()->root() + $DIC->logger()->forComponent('lti') ); $certificateArray = $userCertificateRepository->fetchActiveCertificatesByTypeForPresentation( diff --git a/components/ILIAS/LTIConsumer/classes/Verification/class.ilObjLTIConsumerVerificationGUI.php b/components/ILIAS/LTIConsumer/classes/Verification/class.ilObjLTIConsumerVerificationGUI.php index 724bb5321988..f080dd0f69d7 100755 --- a/components/ILIAS/LTIConsumer/classes/Verification/class.ilObjLTIConsumerVerificationGUI.php +++ b/components/ILIAS/LTIConsumer/classes/Verification/class.ilObjLTIConsumerVerificationGUI.php @@ -64,7 +64,7 @@ public function save(): void $certificateVerificationFileService = new ilCertificateVerificationFileService( $DIC->language(), $DIC->database(), - $DIC->logger()->root(), + $DIC->logger()->forComponent('lti'), new ilCertificateVerificationClassMap() ); diff --git a/components/ILIAS/LTIConsumer/classes/class.ilLTIConsumerGradeServiceScores.php b/components/ILIAS/LTIConsumer/classes/class.ilLTIConsumerGradeServiceScores.php index a6ecbf0d1ecd..d3ab5da61264 100755 --- a/components/ILIAS/LTIConsumer/classes/class.ilLTIConsumerGradeServiceScores.php +++ b/components/ILIAS/LTIConsumer/classes/class.ilLTIConsumerGradeServiceScores.php @@ -83,7 +83,7 @@ protected function checkScore(string $requestData, int $objId): int { global $DIC; /* @var \ILIAS\DI\Container $DIC */ - $logger = $DIC->logger()->root(); + $logger = $DIC->logger()->forComponent('lti'); $logger->info('checkScore'); $score = json_decode($requestData); diff --git a/components/ILIAS/LTIConsumer/classes/class.ilLTIConsumerResult.php b/components/ILIAS/LTIConsumer/classes/class.ilLTIConsumerResult.php index 4d2cff2f57eb..65a7b6f70985 100755 --- a/components/ILIAS/LTIConsumer/classes/class.ilLTIConsumerResult.php +++ b/components/ILIAS/LTIConsumer/classes/class.ilLTIConsumerResult.php @@ -76,7 +76,7 @@ public static function getByKeys(int $a_obj_id, int $a_usr_id, ?bool $a_create = { global $DIC; - $logger = $DIC->logger()->root(); + $logger = $DIC->logger()->forComponent('lti'); $logger->info('getByKeys: ' . $a_obj_id . ' ' . $a_usr_id); $query = 'SELECT * FROM lti_consumer_results' @@ -119,7 +119,7 @@ public function save(): bool { global $DIC; /* @var \ILIAS\DI\Container $DIC */ - $logger = $DIC->logger()->root(); + $logger = $DIC->logger()->forComponent('lti'); $logger->info('save: ' . $this->obj_id . ' ' . $this->usr_id); @@ -130,7 +130,7 @@ public function save(): bool $this->id = $DIC->database()->nextId('lti_consumer_results'); } - $logger = $DIC->logger()->root(); + $logger = $DIC->logger()->forComponent('lti'); $logger->info('save 2: ' . $this->obj_id . ' ' . $this->usr_id); diff --git a/components/ILIAS/LTIConsumer/classes/class.ilLTIConsumerResultService.php b/components/ILIAS/LTIConsumer/classes/class.ilLTIConsumerResultService.php index 83912657e3c7..2ed7945b7b54 100755 --- a/components/ILIAS/LTIConsumer/classes/class.ilLTIConsumerResultService.php +++ b/components/ILIAS/LTIConsumer/classes/class.ilLTIConsumerResultService.php @@ -99,7 +99,7 @@ public function handleRequest(): void try { global $DIC; - $logger = $DIC->logger()->root(); + $logger = $DIC->logger()->forComponent('lti'); $logger->info('LTI Consumer Result Service: Incoming request'); // get the request as xml $xml = simplexml_load_file('php://input'); @@ -192,7 +192,7 @@ protected function readResult(\SimpleXMLElement $request): void protected function replaceResult(\SimpleXMLElement $request): void { global $DIC; - $logger = $DIC->logger()->root(); + $logger = $DIC->logger()->forComponent('lti'); $result = (string) $request->resultRecord->result->resultScore->textString; $logger->info('LTI Consumer Result Service: Replace result. Result: ' . $result); diff --git a/components/ILIAS/LTIConsumer/classes/class.ilObjLTIConsumer.php b/components/ILIAS/LTIConsumer/classes/class.ilObjLTIConsumer.php index 081a00fd8643..f294f23daf49 100755 --- a/components/ILIAS/LTIConsumer/classes/class.ilObjLTIConsumer.php +++ b/components/ILIAS/LTIConsumer/classes/class.ilObjLTIConsumer.php @@ -1204,7 +1204,7 @@ public static function getIliasHttpPath(): string { global $DIC; - $logger = $DIC->logger()->root(); + $logger = $DIC->logger()->forComponent('lti'); if ($DIC['https']->isDetected()) { $protocol = 'https://'; diff --git a/components/ILIAS/LTIProvider/classes/Screen/CustomBreadcrumbPagePartProvider.php b/components/ILIAS/LTIProvider/classes/Screen/CustomBreadcrumbPagePartProvider.php index ee2667d2a18f..7914d200bd2c 100644 --- a/components/ILIAS/LTIProvider/classes/Screen/CustomBreadcrumbPagePartProvider.php +++ b/components/ILIAS/LTIProvider/classes/Screen/CustomBreadcrumbPagePartProvider.php @@ -32,7 +32,7 @@ public function __construct(PagePartProvider $original) global $DIC; $this->refinery = $DIC->refinery(); $this->original = $original; - $this->logger = $DIC->logger()->root(); + $this->logger = $DIC->logger()->forComponent('ltis'); } public function getTitle(): string diff --git a/components/ILIAS/LTIProvider/classes/class.ilLTIAppEventListener.php b/components/ILIAS/LTIProvider/classes/class.ilLTIAppEventListener.php index 4f3dcd0b559a..b526b8781248 100644 --- a/components/ILIAS/LTIProvider/classes/class.ilLTIAppEventListener.php +++ b/components/ILIAS/LTIProvider/classes/class.ilLTIAppEventListener.php @@ -133,7 +133,7 @@ protected function doCronUpdate(ilDateTime $since): void protected function definePercentageByObjectId(int|null $status, string $obj_id, int|null $percentage): int { global $DIC; - $logger = $DIC->logger()->root(); + $logger = $DIC->logger()->forComponent('ltis'); $logger->debug('definePercentageByObjectId'); $indentifier = ilObjectFactory::getInstanceByRefId((int) $obj_id)->getType(); $logger->info('Object type: ' . $indentifier . " for object id: " . $obj_id); diff --git a/components/ILIAS/Language/classes/class.ilLanguage.php b/components/ILIAS/Language/classes/class.ilLanguage.php index a448ec175e71..5275ee22bc92 100755 --- a/components/ILIAS/Language/classes/class.ilLanguage.php +++ b/components/ILIAS/Language/classes/class.ilLanguage.php @@ -75,7 +75,7 @@ public function __construct(string $a_lang_key) global $DIC; $client_ini = $DIC->clientIni(); - $this->log = $DIC->logger()->root(); + $this->log = $DIC->logger()->forComponent('lang'); $this->lang_key = $a_lang_key; diff --git a/components/ILIAS/Language/classes/class.ilObjLanguageExt.php b/components/ILIAS/Language/classes/class.ilObjLanguageExt.php index 955f55283898..162b832986a7 100755 --- a/components/ILIAS/Language/classes/class.ilObjLanguageExt.php +++ b/components/ILIAS/Language/classes/class.ilObjLanguageExt.php @@ -456,7 +456,7 @@ public static function _saveValues(string $a_lang_key, array $a_values = array() )); $row = $ilDB->fetchAssoc($set); if (!$row) { - $DIC->logger()->root()->warning("Language module '{$module}' not found for language {$a_lang_key}."); + $DIC->logger()->forComponent('lang')->warning("Language module '{$module}' not found for language {$a_lang_key}."); continue; } diff --git a/components/ILIAS/LearningSequence/classes/Members/class.ilLearningSequenceParticipants.php b/components/ILIAS/LearningSequence/classes/Members/class.ilLearningSequenceParticipants.php index e13fc3f71a78..3d78d96bf50d 100755 --- a/components/ILIAS/LearningSequence/classes/Members/class.ilLearningSequenceParticipants.php +++ b/components/ILIAS/LearningSequence/classes/Members/class.ilLearningSequenceParticipants.php @@ -50,7 +50,7 @@ public static function _getInstanceByObjId(int $obj_id): ilLearningSequenceParti { global $DIC; - $logger = $DIC["ilLoggerFactory"]->getRootLogger(); + $logger = $DIC["ilLoggerFactory"]->getComponentLogger('lso'); $app_event_handler = $DIC['ilAppEventHandler']; $settings = $DIC["ilSetting"]; diff --git a/components/ILIAS/LearningSequence/classes/class.ilLSLocalDI.php b/components/ILIAS/LearningSequence/classes/class.ilLSLocalDI.php index d4f5b46a50a1..04be95cb1837 100755 --- a/components/ILIAS/LearningSequence/classes/class.ilLSLocalDI.php +++ b/components/ILIAS/LearningSequence/classes/class.ilLSLocalDI.php @@ -245,7 +245,7 @@ public function init( $this["participants"] = function ($c) use ($dic): ilLearningSequenceParticipants { return new ilLearningSequenceParticipants( $c["obj.obj_id"], - $dic["ilLoggerFactory"]->getRootLogger(), + $dic["ilLoggerFactory"]->getComponentLogger('lso'), $dic["ilAppEventHandler"], $dic["ilSetting"] ); diff --git a/components/ILIAS/LearningSequence/classes/class.ilLearningSequenceImporter.php b/components/ILIAS/LearningSequence/classes/class.ilLearningSequenceImporter.php index 28f7a11d4364..8864005cf93e 100755 --- a/components/ILIAS/LearningSequence/classes/class.ilLearningSequenceImporter.php +++ b/components/ILIAS/LearningSequence/classes/class.ilLearningSequenceImporter.php @@ -31,7 +31,7 @@ public function init(): void global $DIC; $this->user = $DIC["ilUser"]; $this->rbac_admin = $DIC["rbacadmin"]; - $this->log = $DIC["ilLoggerFactory"]->getRootLogger(); + $this->log = $DIC["ilLoggerFactory"]->getComponentLogger('lso'); } public function importXmlRepresentation(string $a_entity, string $a_id, string $a_xml, ilImportMapping $a_mapping): void diff --git a/components/ILIAS/LearningSequence/classes/class.ilObjLearningSequence.php b/components/ILIAS/LearningSequence/classes/class.ilObjLearningSequence.php index 760833018d3a..f9f86299aca7 100755 --- a/components/ILIAS/LearningSequence/classes/class.ilObjLearningSequence.php +++ b/components/ILIAS/LearningSequence/classes/class.ilObjLearningSequence.php @@ -61,7 +61,7 @@ public function __construct(int $id = 0, bool $call_by_reference = true) $this->ctrl = $DIC['ilCtrl']; $this->user = $DIC['ilUser']; $this->tree = $DIC['tree']; - $this->log = $DIC["ilLoggerFactory"]->getRootLogger(); + $this->log = $DIC["ilLoggerFactory"]->getComponentLogger('lso'); $this->app_event_handler = $DIC['ilAppEventHandler']; $this->il_news = $DIC->news(); $this->il_condition_handler = new ilConditionHandler(); diff --git a/components/ILIAS/LearningSequence/classes/class.ilObjLearningSequenceGUI.php b/components/ILIAS/LearningSequence/classes/class.ilObjLearningSequenceGUI.php index 107215124c05..1ec5d29754ef 100755 --- a/components/ILIAS/LearningSequence/classes/class.ilObjLearningSequenceGUI.php +++ b/components/ILIAS/LearningSequence/classes/class.ilObjLearningSequenceGUI.php @@ -219,7 +219,7 @@ public function __construct() $this->ui_renderer = $DIC['ui.renderer']; $this->request = $DIC->http()->request(); - $this->log = $DIC["ilLoggerFactory"]->getRootLogger(); + $this->log = $DIC["ilLoggerFactory"]->getComponentLogger('lso'); $this->app_event_handler = $DIC['ilAppEventHandler']; $this->navigation_history = $DIC['ilNavigationHistory']; $this->obj_definition = $DIC['objDefinition']; diff --git a/components/ILIAS/Logging/classes/public/class.ilLoggerFactory.php b/components/ILIAS/Logging/classes/public/class.ilLoggerFactory.php index 849b836548af..976abc17ebc4 100755 --- a/components/ILIAS/Logging/classes/public/class.ilLoggerFactory.php +++ b/components/ILIAS/Logging/classes/public/class.ilLoggerFactory.php @@ -62,15 +62,6 @@ public static function getLogger(string $a_component_id): ilLogger return $factory->getComponentLogger($a_component_id); } - /** - * The unique root logger has a fixed error level - */ - public static function getRootLogger(): ilLogger - { - $factory = self::getInstance(); - return $factory->getComponentLogger('root'); - } - /** * Init user specific log options diff --git a/components/ILIAS/Notifications/classes/ilNotificationPushHandler.php b/components/ILIAS/Notifications/classes/ilNotificationPushHandler.php index 7e34174441c9..a39329402328 100644 --- a/components/ILIAS/Notifications/classes/ilNotificationPushHandler.php +++ b/components/ILIAS/Notifications/classes/ilNotificationPushHandler.php @@ -57,7 +57,7 @@ public function __construct(PushProviderInterface $provider) { global $DIC; $this->provider = $provider; - $this->logger = $DIC->logger()->root(); + $this->logger = $DIC->logger()->forComponent('noti'); $this->sub = $DIC->settings()->get('admin_email'); $this->subscription_repo = new PushRepository($DIC->database(), $DIC->user()); $settings = new ilSetting('notifications'); diff --git a/components/ILIAS/Repository/Deletion/EventStandardAdapter.php b/components/ILIAS/Repository/Deletion/EventStandardAdapter.php index dc72dc64a9aa..bbe34060a39f 100644 --- a/components/ILIAS/Repository/Deletion/EventStandardAdapter.php +++ b/components/ILIAS/Repository/Deletion/EventStandardAdapter.php @@ -31,7 +31,7 @@ public function __construct( protected InternalDomainService $domain, ) { $this->event_handler = $domain->event(); - $this->log = $domain->logger()->root(); + $this->log = $domain->logger()->forComponent('rep'); } public function beforeMoveToTrash(int $ref_id, array $subnodes): void diff --git a/components/ILIAS/ScormAicc/classes/SCORM/class.ilSCORMPresentationGUI.php b/components/ILIAS/ScormAicc/classes/SCORM/class.ilSCORMPresentationGUI.php index 70a8ec1cd33f..a57b82feaf02 100755 --- a/components/ILIAS/ScormAicc/classes/SCORM/class.ilSCORMPresentationGUI.php +++ b/components/ILIAS/ScormAicc/classes/SCORM/class.ilSCORMPresentationGUI.php @@ -508,7 +508,7 @@ public function downloadCertificate(): void $certValidator = new ilCertificateDownloadValidator(); $allowed = $certValidator->isCertificateDownloadable($ilUser->getId(), $obj_id); if ($allowed) { - $certificateLogger = $DIC->logger()->root(); + $certificateLogger = $DIC->logger()->forComponent('sahs'); $ilUserCertificateRepository = new ilUserCertificateRepository(); $pdfGenerator = new ilPdfGenerator($ilUserCertificateRepository); diff --git a/components/ILIAS/ScormAicc/classes/Verification/class.ilObjSCORMVerificationGUI.php b/components/ILIAS/ScormAicc/classes/Verification/class.ilObjSCORMVerificationGUI.php index df2af9699cb4..580222de71e7 100755 --- a/components/ILIAS/ScormAicc/classes/Verification/class.ilObjSCORMVerificationGUI.php +++ b/components/ILIAS/ScormAicc/classes/Verification/class.ilObjSCORMVerificationGUI.php @@ -65,7 +65,7 @@ public function save(): void $certificateVerificationFileService = new ilCertificateVerificationFileService( $DIC->language(), $DIC->database(), - $DIC->logger()->root(), + $DIC->logger()->forComponent('sahs'), new ilCertificateVerificationClassMap() ); diff --git a/components/ILIAS/ScormAicc/classes/Verification/class.ilSCORMVerificationTableGUI.php b/components/ILIAS/ScormAicc/classes/Verification/class.ilSCORMVerificationTableGUI.php index d7446b4cc0b8..c98e5948424f 100755 --- a/components/ILIAS/ScormAicc/classes/Verification/class.ilSCORMVerificationTableGUI.php +++ b/components/ILIAS/ScormAicc/classes/Verification/class.ilSCORMVerificationTableGUI.php @@ -38,7 +38,7 @@ public function __construct( $ilCtrl = $DIC->ctrl(); $database = $DIC->database(); - $logger = $DIC->logger()->root(); + $logger = $DIC->logger()->forComponent('sahs'); if (null === $userCertificateRepository) { $userCertificateRepository = new ilUserCertificateRepository($database, $logger); diff --git a/components/ILIAS/Test/classes/class.ilObjTest.php b/components/ILIAS/Test/classes/class.ilObjTest.php index e324175b584e..46b85830e5a1 100755 --- a/components/ILIAS/Test/classes/class.ilObjTest.php +++ b/components/ILIAS/Test/classes/class.ilObjTest.php @@ -5579,7 +5579,7 @@ public static function getSingleManualFeedback(int $active_id, int $question_id, $row = $ilDB->fetchAssoc($result); $row['feedback'] = ilRTE::_replaceMediaObjectImageSrc($row['feedback'] ?? '', 1); } elseif ($ilDB->numRows($result) > 1) { - $DIC->logger()->root()->warning( + $DIC->logger()->forComponent('tst')->warning( "WARNING: Multiple feedback entries on tst_manual_fb for " . "active_fi = $active_id , question_fi = $question_id and pass = $pass" ); diff --git a/components/ILIAS/Test/classes/class.ilObjTestVerificationGUI.php b/components/ILIAS/Test/classes/class.ilObjTestVerificationGUI.php index dcefc57e1d64..a95592d72dff 100755 --- a/components/ILIAS/Test/classes/class.ilObjTestVerificationGUI.php +++ b/components/ILIAS/Test/classes/class.ilObjTestVerificationGUI.php @@ -59,7 +59,7 @@ public function create(): void $this->ctrl->getLinkTarget($this, "cancel") ); - $table = new ilTestVerificationTableGUI($this, 'create', $this->db, $this->user, $this->logger->root()); + $table = new ilTestVerificationTableGUI($this, 'create', $this->db, $this->user, $this->logger->forComponent('tst')); $this->tpl->setContent($table->getHTML()); } @@ -70,7 +70,7 @@ public function save(): void $certificateVerificationFileService = new ilCertificateVerificationFileService( $this->lng, $this->db, - $this->logger->root(), + $this->logger->forComponent('tst'), new ilCertificateVerificationClassMap() ); diff --git a/components/ILIAS/TestQuestionPool/classes/class.assImagemapQuestion.php b/components/ILIAS/TestQuestionPool/classes/class.assImagemapQuestion.php index e973314dd88a..c01d92697d56 100755 --- a/components/ILIAS/TestQuestionPool/classes/class.assImagemapQuestion.php +++ b/components/ILIAS/TestQuestionPool/classes/class.assImagemapQuestion.php @@ -206,7 +206,7 @@ public function copyImagemapFiles( } if (!file_exists($image_source_path) || !is_readable($image_source_path)) { - $this->log->root()->alert( + $this->log->forComponent('qpl')->alert( "Could not copy imagemap question files: Source path '{$image_source_path}' does not exist or is not readable.", [ 'source_question_id' => $source_question_id, diff --git a/components/ILIAS/TestQuestionPool/classes/class.assMatchingQuestion.php b/components/ILIAS/TestQuestionPool/classes/class.assMatchingQuestion.php index fa5c34243f11..cdfe104f27ee 100755 --- a/components/ILIAS/TestQuestionPool/classes/class.assMatchingQuestion.php +++ b/components/ILIAS/TestQuestionPool/classes/class.assMatchingQuestion.php @@ -350,7 +350,7 @@ private function cloneImages( $filename = $term->getPicture(); if (!file_exists($image_source_path . $filename) || !copy($image_source_path . $filename, $image_target_path . $filename)) { - $this->log->root()->warning('matching question image could not be copied: ' + $this->log->forComponent('qpl')->warning('matching question image could not be copied: ' . $image_source_path . $filename); } if (!file_exists($image_source_path . $this->getThumbPrefix() . $filename) @@ -358,7 +358,7 @@ private function cloneImages( $image_source_path . $this->getThumbPrefix() . $filename, $image_target_path . $this->getThumbPrefix() . $filename )) { - $this->log->root()->warning('matching question image thumbnail could not be copied: ' + $this->log->forComponent('qpl')->warning('matching question image thumbnail could not be copied: ' . $image_source_path . $this->getThumbPrefix() . $filename); } } @@ -370,7 +370,7 @@ private function cloneImages( if (!file_exists($image_source_path . $filename) || !copy($image_source_path . $filename, $image_target_path . $filename)) { - $this->log->root()->warning('matching question image could not be copied: ' + $this->log->forComponent('qpl')->warning('matching question image could not be copied: ' . $image_source_path . $filename); } @@ -379,7 +379,7 @@ private function cloneImages( $image_source_path . $this->getThumbPrefix() . $filename, $image_target_path . $this->getThumbPrefix() . $filename )) { - $this->log->root()->warning('matching question image thumbnail could not be copied: ' + $this->log->forComponent('qpl')->warning('matching question image thumbnail could not be copied: ' . $image_source_path . $this->getThumbPrefix() . $filename); } } diff --git a/components/ILIAS/TestQuestionPool/classes/class.assOrderingQuestion.php b/components/ILIAS/TestQuestionPool/classes/class.assOrderingQuestion.php index 3b6f13861f80..0f332c7e678d 100755 --- a/components/ILIAS/TestQuestionPool/classes/class.assOrderingQuestion.php +++ b/components/ILIAS/TestQuestionPool/classes/class.assOrderingQuestion.php @@ -199,11 +199,11 @@ public function cloneImages( if (!file_exists($image_source_path . $filename) || !copy($image_source_path . $filename, $image_target_path . $filename)) { - $this->log->root()->warning('Image could not be cloned for object for question: ' . $target_question_id); + $this->log->forComponent('qpl')->warning('Image could not be cloned for object for question: ' . $target_question_id); } if (!file_exists($image_source_path . $this->getThumbPrefix() . $filename) || !copy($image_source_path . $this->getThumbPrefix() . $filename, $image_target_path . $this->getThumbPrefix() . $filename)) { - $this->log->root()->warning('Image thumbnails could not be cloned for object for question: ' . $target_question_id); + $this->log->forComponent('qpl')->warning('Image thumbnails could not be cloned for object for question: ' . $target_question_id); } } } diff --git a/components/ILIAS/TestQuestionPool/classes/class.assQuestion.php b/components/ILIAS/TestQuestionPool/classes/class.assQuestion.php index 5fe7dd438d73..5395d9924ff2 100755 --- a/components/ILIAS/TestQuestionPool/classes/class.assQuestion.php +++ b/components/ILIAS/TestQuestionPool/classes/class.assQuestion.php @@ -856,7 +856,7 @@ public function delete(int $question_id): void try { $this->deletePageOfQuestion($question_id); } catch (Exception $e) { - $this->log->root()->error("EXCEPTION: Could not delete page of question $question_id: $e"); + $this->log->forComponent('qpl')->error("EXCEPTION: Could not delete page of question $question_id: $e"); return; } @@ -875,7 +875,7 @@ public function delete(int $question_id): void $this->feedbackOBJ->deleteGenericFeedbacks($question_id, $this->isAdditionalContentEditingModePageObject()); $this->feedbackOBJ->deleteSpecificAnswerFeedbacks($question_id, $this->isAdditionalContentEditingModePageObject()); } catch (Exception $e) { - $this->log->root()->error("EXCEPTION: Could not delete additional table data of question {$question_id}: {$e}"); + $this->log->forComponent('qpl')->error("EXCEPTION: Could not delete additional table data of question {$question_id}: {$e}"); } try { @@ -886,13 +886,13 @@ public function delete(int $question_id): void [$question_id] ); } catch (Exception $e) { - $this->log->root()->error("EXCEPTION: Could not delete delete question {$question_id} from a test: {$e}"); + $this->log->forComponent('qpl')->error("EXCEPTION: Could not delete delete question {$question_id} from a test: {$e}"); } try { $this->getSuggestedSolutionsRepo()->deleteForQuestion($question_id); } catch (Exception $e) { - $this->log->root()->error("EXCEPTION: Could not delete suggested solutions of question {$question_id}: {$e}"); + $this->log->forComponent('qpl')->error("EXCEPTION: Could not delete suggested solutions of question {$question_id}: {$e}"); } $directory = CLIENT_WEB_DIR . "/assessment/" . $obj_id . "/$question_id"; @@ -901,7 +901,7 @@ public function delete(int $question_id): void ilFileUtils::delDir($directory); } } catch (Exception $e) { - $this->log->root()->error("EXCEPTION: Could not delete question file directory {$directory} of question {$question_id}: {$e}"); + $this->log->forComponent('qpl')->error("EXCEPTION: Could not delete question file directory {$directory} of question {$question_id}: {$e}"); } try { @@ -918,7 +918,7 @@ public function delete(int $question_id): void } } } catch (Exception $e) { - $this->log->root()->error("EXCEPTION: Error deleting the media objects of question {$question_id}: {$e}"); + $this->log->forComponent('qpl')->error("EXCEPTION: Error deleting the media objects of question {$question_id}: {$e}"); } $assignmentList = new ilAssQuestionSkillAssignmentList($this->db); $assignmentList->setParentObjId($obj_id); @@ -944,7 +944,7 @@ public function delete(int $question_id): void try { ilObjQuestionPool::_updateQuestionCount($this->getObjId()); } catch (Exception $e) { - $this->log->root()->error( + $this->log->forComponent('qpl')->error( "EXCEPTION: Error updating the question pool question count of" . " question pool {$this->getObjId()} when deleting question {$question_id}: {$e}" ); @@ -1560,8 +1560,8 @@ protected function duplicateSuggestedSolutionFiles(int $parent_id, int $question } if (!is_file($filepath_original . $solution->getFilename()) || !copy($filepath_original . $solution->getFilename(), $filepath . $solution->getFilename())) { - $this->log->root()->error('File for suggested solutions could not be duplicated:'); - $this->log->root()->error("Question-Id: {$this->id}; Question-Title: {$this->title}; File: {$filepath_original}{$solution->getFilename()}"); + $this->log->forComponent('qpl')->error('File for suggested solutions could not be duplicated:'); + $this->log->forComponent('qpl')->error("Question-Id: {$this->id}; Question-Title: {$this->title}; File: {$filepath_original}{$solution->getFilename()}"); } } } @@ -1585,8 +1585,8 @@ protected function cloneSuggestedSolutionFiles( if (!is_file($filepath_original . $solution->getFilename()) || copy($filepath_target . $solution->getFilename(), $filepath_target . $solution->getFilename())) { - $this->log->root()->error('File for suggested solutions could not be cloned:'); - $this->log->root()->error("Question-Id: {$this->id}; Question-Title: {$this->title}; File: {$filepath_original}{$solution->getFilename()}"); + $this->log->forComponent('qpl')->error('File for suggested solutions could not be cloned:'); + $this->log->forComponent('qpl')->error("Question-Id: {$this->id}; Question-Title: {$this->title}; File: {$filepath_original}{$solution->getFilename()}"); } } } diff --git a/components/ILIAS/TestQuestionPool/classes/class.ilAssFileUploadUploadsExporter.php b/components/ILIAS/TestQuestionPool/classes/class.ilAssFileUploadUploadsExporter.php index 65929f97361c..18e64542f866 100755 --- a/components/ILIAS/TestQuestionPool/classes/class.ilAssFileUploadUploadsExporter.php +++ b/components/ILIAS/TestQuestionPool/classes/class.ilAssFileUploadUploadsExporter.php @@ -261,7 +261,7 @@ private function createFileUploadCollectionZipFile(): void try { ilFileUtils::rename($this->tempZipFilePath, $this->finalZipFilePath); } catch (\ilFileUtilsException $e) { - \ilLoggerFactory::getRootLogger()->error($e->getMessage()); + \ilLoggerFactory::getLogger('tst')->error($e->getMessage()); } } diff --git a/components/ILIAS/TestQuestionPool/classes/class.ilImagemapPreview.php b/components/ILIAS/TestQuestionPool/classes/class.ilImagemapPreview.php index 903c5fca2682..c661eda710f4 100755 --- a/components/ILIAS/TestQuestionPool/classes/class.ilImagemapPreview.php +++ b/components/ILIAS/TestQuestionPool/classes/class.ilImagemapPreview.php @@ -236,7 +236,7 @@ public static function execQuoted($cmd, $args = null) } exec($cmd, $arr); - $DIC->logger()->root()->debug("ilUtil::execQuoted: " . $cmd . "."); + $DIC->logger()->forComponent('qpl')->debug("ilUtil::execQuoted: " . $cmd . "."); return $arr; } diff --git a/components/ILIAS/TestQuestionPool/src/ManipulateImagesInChoiceQuestionsTrait.php b/components/ILIAS/TestQuestionPool/src/ManipulateImagesInChoiceQuestionsTrait.php index 316c5260aeed..687f6bac946a 100644 --- a/components/ILIAS/TestQuestionPool/src/ManipulateImagesInChoiceQuestionsTrait.php +++ b/components/ILIAS/TestQuestionPool/src/ManipulateImagesInChoiceQuestionsTrait.php @@ -59,11 +59,11 @@ private function cloneImages( if (!file_exists($image_source_path . $filename) || !copy($image_source_path . $filename, $image_target_path . $filename)) { - $this->log->root()->warning('Image could not be cloned for object for question: ' . $target_question_id); + $this->log->forComponent('qpl')->warning('Image could not be cloned for object for question: ' . $target_question_id); } if (!file_exists($image_source_path . $this->getThumbPrefix() . $filename) || !copy($image_source_path . $this->getThumbPrefix() . $filename, $image_target_path . $this->getThumbPrefix() . $filename)) { - $this->log->root()->warning('Image thumbnail could not be cloned for object for question: ' . $target_question_id); + $this->log->forComponent('qpl')->warning('Image thumbnail could not be cloned for object for question: ' . $target_question_id); } } } diff --git a/components/ILIAS/User/src/Account/class.DeleteAccountGUI.php b/components/ILIAS/User/src/Account/class.DeleteAccountGUI.php index 2e72c151bf44..375d3d7cc7d6 100755 --- a/components/ILIAS/User/src/Account/class.DeleteAccountGUI.php +++ b/components/ILIAS/User/src/Account/class.DeleteAccountGUI.php @@ -220,7 +220,7 @@ protected function deleteOwnAccountStep3(): void $mmail->Send(); } - $this->log->root()->log( + $this->log->forComponent('usr')->log( 'Account deleted: ' . $this->current_user->getLogin() . ' (' . $this->current_user->getId() . ')' ); diff --git a/components/ILIAS/Utilities/classes/class.ilShellUtil.php b/components/ILIAS/Utilities/classes/class.ilShellUtil.php index 77726e98dd4b..a35dcac5af8e 100755 --- a/components/ILIAS/Utilities/classes/class.ilShellUtil.php +++ b/components/ILIAS/Utilities/classes/class.ilShellUtil.php @@ -130,7 +130,7 @@ public static function execQuoted(string $cmd, ?string $args = null): array } $arr = []; exec($cmd, $arr); - $DIC->logger()->root()->debug("ilUtil::execQuoted: " . $cmd . "."); + $DIC->logger()->forComponent('util')->debug("ilUtil::execQuoted: " . $cmd . "."); return $arr; } diff --git a/components/ILIAS/VirusScanner/classes/class.ilVirusScanner.php b/components/ILIAS/VirusScanner/classes/class.ilVirusScanner.php index d31fdd1dbf1c..68d388930770 100644 --- a/components/ILIAS/VirusScanner/classes/class.ilVirusScanner.php +++ b/components/ILIAS/VirusScanner/classes/class.ilVirusScanner.php @@ -55,7 +55,7 @@ public function __construct(string $scan_command, string $clean_command) global $DIC; $error = $DIC['ilErr']; $lng = $DIC->language(); - $log = $DIC->logger()->root(); + $log = $DIC->logger()->forComponent('virusscanner'); $this->error = $error; $this->lng = $lng; diff --git a/components/ILIAS/VirusScanner/classes/class.ilVirusScannerFactory.php b/components/ILIAS/VirusScanner/classes/class.ilVirusScannerFactory.php index a797c5ea870c..b391a66a29dc 100644 --- a/components/ILIAS/VirusScanner/classes/class.ilVirusScannerFactory.php +++ b/components/ILIAS/VirusScanner/classes/class.ilVirusScannerFactory.php @@ -38,7 +38,7 @@ public static function _getInstance(): ?ilVirusScanner case 'AntiVir': global $DIC; - $DIC->logger()->root()->error('AntiVir is deprecated, please install and use a different virus scanner.'); + $DIC->logger()->forComponent('virusscanner')->error('AntiVir is deprecated, please install and use a different virus scanner.'); $vs = new ilVirusScannerAntiVir(IL_VIRUS_SCAN_COMMAND, IL_VIRUS_CLEAN_COMMAND); break;