Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions components/ILIAS/AccessControl/service.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@
checkbox="1" inherit="0" translate="0" rbac="0">
</object>
</objects>
<events>
<events>
<event type="raise" id="assignUser" />
<event type="raise" id="deassignUser" />
</events>
<logging />
</service>
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
1 change: 0 additions & 1 deletion components/ILIAS/Administration/service.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,4 @@
<parent id="adm" max="1">adm</parent>
</object>
</objects>
<logging />
</service>
1 change: 0 additions & 1 deletion components/ILIAS/AdministrativeNotification/service.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version = "1.0" encoding = "UTF-8"?>
<service xmlns="http://www.w3.org" version="$Id$" id="adn">
<baseclasses />
<logging />
<objects>
<object id="adn" class_name="AdministrativeNotification" dir="classes" checkbox="0" inherit="0" translate="sys" rbac="1" system="1" administration="1">
<parent id="adm" max="1">adm</parent>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.');
}
}

Expand Down
1 change: 0 additions & 1 deletion components/ILIAS/AdvancedMetaData/service.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@
<pluginslots>
<pluginslot id="amdc" name="AdvancedMDClaiming" />
</pluginslots>
<logging/>
</service>
Original file line number Diff line number Diff line change
Expand Up @@ -64,26 +64,26 @@ 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)) {
$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);
}
}
// check if is assigned to minimum one global role
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);
}

Expand All @@ -95,23 +95,23 @@ 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);
while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
$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);
}
}
// Assign to default if no matching found
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);
}

Expand Down
3 changes: 1 addition & 2 deletions components/ILIAS/Authentication/service.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent id="adm" max="1">adm</parent>
</object>
</objects>
<events>
<events>
<event type="raise" id="afterLogin" />
<event type="raise" id="beforeLogout" />
<event type="raise" id="afterLogout" />
Expand All @@ -22,7 +22,6 @@
<pluginslots>
<pluginslot id="authhk" name="AuthenticationHook" />
</pluginslots>
<logging />
<crons>
<cron id="auth_destroy_expired_sessions" class="ilAuthDestroyExpiredSessionsCron" />
</crons>
Expand Down
1 change: 0 additions & 1 deletion components/ILIAS/Awareness/service.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@
<parent id="adm" max="1">adm</parent>
</object>
</objects>
<logging />
</service>
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 0 additions & 2 deletions components/ILIAS/BackgroundTasks_/service.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,4 @@
<gsproviders>
<gsprovider class_name="ilBTGSProvider" purpose="meta_bar_static"/>
</gsproviders>

<logging />
</service>
2 changes: 1 addition & 1 deletion components/ILIAS/Badge/classes/class.ilBadge.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
1 change: 0 additions & 1 deletion components/ILIAS/Benchmark/service.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@
<parent id="adm" max="1">adm</parent>
</object>
</objects>
<logging />
</service>
1 change: 0 additions & 1 deletion components/ILIAS/BookingManager/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,4 @@
<cron id="book_notification" class="ilBookCronNotification" />
<cron id="book_pref_book" class="ilBookingPrefBookCron" />
</crons>
<logging />
</module>
Original file line number Diff line number Diff line change
Expand Up @@ -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 " .
Expand Down
1 change: 0 additions & 1 deletion components/ILIAS/COPage/service.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
<pagecontent pc_type="map" name="Map" directory="PC/Map" int_links="0" style_classes="0" xsl="0" def_enabled="0" top_item="1" order_nr="280"/>
<pageobject parent_type="stys" class_name="ilPageLayoutPage" directory="Layout/classes"/>
</copage>
<logging />
<crons>
<cron id="copg_history_cleanup" class="ilCleanCOPageHistoryCronjob" path="Services/COPage/Cron" />
</crons>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
3 changes: 1 addition & 2 deletions components/ILIAS/Calendar/service.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent id="adm" max="1">adm</parent>
</object>
</objects>
<events>
<events>
<event type="listen" id="components/ILIAS/Group" />
<event type="listen" id="components/ILIAS/Session" />
<event type="listen" id="components/ILIAS/Course" />
Expand All @@ -24,5 +24,4 @@
<pluginslot id="capm" name="AppointmentCustomModal" />
<pluginslot id="capg" name="AppointmentCustomGrid" />
</pluginslots>
<logging />
</service>
Original file line number Diff line number Diff line change
Expand Up @@ -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 '';
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
3 changes: 1 addition & 2 deletions components/ILIAS/Category/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
<parent id="root">root</parent>
</object>
</objects>
<events>
<events>
<event type="raise" id="delete" />
</events>
<logging/>
</module>
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
1 change: 0 additions & 1 deletion components/ILIAS/Certificate/service.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,4 @@
<crons>
<cron id="certificate" class="ilCertificateCron" />
</crons>
<logging />
</service>
Original file line number Diff line number Diff line change
Expand Up @@ -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 '';
Expand Down
1 change: 0 additions & 1 deletion components/ILIAS/Chatroom/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
<events>
<event type="listen" id="components/ILIAS/User" />
</events>
<logging />
<web_access_checker>
<secure_path path="chatroom" checking-class="ilObjChatroomAccess" />
</web_access_checker>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ protected function getItems(): void

$userCertificateRepository = new ilUserCertificateRepository(
$DIC->database(),
$DIC->logger()->root()
$DIC->logger()->forComponent('cmix')
);

$certificateArray = $userCertificateRepository->fetchActiveCertificatesByTypeForPresentation(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function save(): void
$certificateVerificationFileService = new ilCertificateVerificationFileService(
$DIC->language(),
$DIC->database(),
$DIC->logger()->root(),
$DIC->logger()->forComponent('cmix'),
new ilCertificateVerificationClassMap()
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
1 change: 0 additions & 1 deletion components/ILIAS/CmiXapi/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
</crons>
<copage />
<web_access_checker />
<logging />
<mailtemplates>
<context id="cmix_context_notification_mail" class="ilCmiXapiNotificationMailTemplateContext" />
</mailtemplates>
Expand Down
1 change: 0 additions & 1 deletion components/ILIAS/Contact/service.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,4 @@
<event type="raise" id="relationLinked" />
<event type="raise" id="relationUnlinked" />
</events>
<logging />
</service>
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion components/ILIAS/Container/classes/class.ilContainer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down
Loading
Loading