ILIAS  release_8 Revision v8.23
ilLoggingMetricsCollectedObjective Class Reference
+ Inheritance diagram for ilLoggingMetricsCollectedObjective:
+ Collaboration diagram for ilLoggingMetricsCollectedObjective:

Protected Member Functions

 getTentativePreconditions (Environment $environment)
 
 collectFrom (Environment $environment, Storage $storage)
 
- Protected Member Functions inherited from ILIAS\Setup\Metrics\CollectedObjective
 collectFrom (Setup\Environment $environment, Storage $storage)
 Attempt to gather metrics based on the provided environment. More...
 
 getTentativePreconditions (Setup\Environment $environment)
 Give preconditions that might or might not be fullfilled. More...
 

Additional Inherited Members

- Public Member Functions inherited from ILIAS\Setup\Metrics\CollectedObjective
 __construct (Storage $storage)
 
 getHash ()
 Get a hash for this objective. More...
 
 getLabel ()
 Get a label that describes this objective. More...
 
 isNotable ()
 Get to know if this is an interesting objective for a human. More...
 
 getPreconditions (Setup\Environment $environment)
 
 achieve (Setup\Environment $environment)
 
 isApplicable (Setup\Environment $environment)
 
- Public Member Functions inherited from ILIAS\Setup\Objective
 getPreconditions (Environment $environment)
 Objectives might depend on other objectives. More...
 
 achieve (Environment $environment)
 Objectives can be achieved. More...
 
 isApplicable (Environment $environment)
 Get to know whether the objective is applicable. More...
 
- Protected Attributes inherited from ILIAS\Setup\Metrics\CollectedObjective
Storage $storage
 

Detailed Description

Definition at line 11 of file class.ilLoggingMetricsCollectedObjective.php.

Member Function Documentation

◆ collectFrom()

ilLoggingMetricsCollectedObjective::collectFrom ( Environment  $environment,
Storage  $storage 
)
protected

Definition at line 20 of file class.ilLoggingMetricsCollectedObjective.php.

References $ini, ILIAS\Setup\Environment\getResource(), ILIAS\Setup\Metrics\Storage\storeConfigBool(), and ILIAS\Setup\Metrics\Storage\storeConfigText().

20  : void
21  {
22  $ini = $environment->getResource(Environment::RESOURCE_ILIAS_INI);
23  if (!$ini) {
24  return;
25  }
26 
27  $storage->storeConfigBool(
28  "enable",
29  (bool) $ini->readVariable("log", "enabled"),
30  "Is the logging enabled on the installation?"
31  );
32  $storage->storeConfigText(
33  "path_to_logfile",
34  $ini->readVariable("log", "path") . "/" . $ini->readVariable("log", "file"),
35  "The path to the logfile."
36  );
37  $storage->storeConfigText(
38  "errorlog_dir",
39  $ini->readVariable("log", "error_path"),
40  "The path to the directory where error protocols are stored."
41  );
42  }
storeConfigText(string $key, string $value, string $description=null)
storeConfigBool(string $key, bool $value, string $description=null)
getResource(string $id)
Consumers of this method should check if the result is what they expect, e.g.
$ini
Definition: raiseError.php:4
+ Here is the call graph for this function:

◆ getTentativePreconditions()

ilLoggingMetricsCollectedObjective::getTentativePreconditions ( Environment  $environment)
protected

Definition at line 13 of file class.ilLoggingMetricsCollectedObjective.php.

13  : array
14  {
15  return [
17  ];
18  }

The documentation for this class was generated from the following file: