ILIAS  release_8 Revision v8.25-1-g13de6a5eca6
class.ilLoggingMetricsCollectedObjective.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
5/* Copyright (c) 2020 Richard Klees <richard.klees@concepts-and-training.de> Extended GPL, see docs/LICENSE */
6
10
12{
13 protected function getTentativePreconditions(Environment $environment): array
14 {
15 return [
17 ];
18 }
19
20 protected function collectFrom(Environment $environment, Storage $storage): void
21 {
22 $ini = $environment->getResource(Environment::RESOURCE_ILIAS_INI);
23 if (!$ini) {
24 return;
25 }
26
28 "enable",
29 (bool) $ini->readVariable("log", "enabled"),
30 "Is the logging enabled on the installation?"
31 );
33 "path_to_logfile",
34 $ini->readVariable("log", "path") . "/" . $ini->readVariable("log", "file"),
35 "The path to the logfile."
36 );
38 "errorlog_dir",
39 $ini->readVariable("log", "error_path"),
40 "The path to the directory where error protocols are stored."
41 );
42 }
43}
Base class to simplify collection of metrics.
collectFrom(Environment $environment, Storage $storage)
An environment holds resources to be used in the setup process.
Definition: Environment.php:28
getResource(string $id)
Consumers of this method should check if the result is what they expect, e.g.
storeConfigBool(string $key, bool $value, string $description=null)
storeConfigText(string $key, string $value, string $description=null)
$ini
Definition: raiseError.php:4