ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilLoggingMetricsCollectedObjective.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
24
26{
27 protected function getTentativePreconditions(Environment $environment): array
28 {
29 return [
31 ];
32 }
33
34 protected function collectFrom(Environment $environment, Storage $storage): void
35 {
36 $ini = $environment->getResource(Environment::RESOURCE_ILIAS_INI);
37 if (!$ini) {
38 return;
39 }
40
42 "enable",
43 (bool) $ini->readVariable("log", "enabled"),
44 "Is the logging enabled on the installation?"
45 );
47 "path_to_logfile",
48 $ini->readVariable("log", "path") . "/" . $ini->readVariable("log", "file"),
49 "The path to the logfile."
50 );
52 "errorlog_dir",
53 $ini->readVariable("log", "error_path"),
54 "The path to the directory where error protocols are stored."
55 );
56 }
57}
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.
storeConfigText(string $key, string $value, ?string $description=null)
storeConfigBool(string $key, bool $value, ?string $description=null)
$ini
Definition: raiseError.php:20