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

Public Member Functions

 __construct (bool $enabled, ?string $path_to_logfile, ?string $errorlog_dir)
 
 isEnabled ()
 
 getPathToLogfile ()
 
 getErrorlogDir ()
 

Protected Member Functions

 normalizePath (?string $p)
 

Protected Attributes

bool $enabled
 
string $path_to_logfile
 
string $path_to_errorlogfiles
 
string $errorlog_dir
 

Detailed Description

Definition at line 9 of file class.ilLoggingSetupConfig.php.

Constructor & Destructor Documentation

◆ __construct()

ilLoggingSetupConfig::__construct ( bool  $enabled,
?string  $path_to_logfile,
?string  $errorlog_dir 
)

Definition at line 17 of file class.ilLoggingSetupConfig.php.

References $enabled, and normalizePath().

21  {
22  if ($enabled && !$path_to_logfile) {
23  throw new \InvalidArgumentException(
24  "Expected a path to the logfile, if logging is enabled."
25  );
26  }
27  $this->enabled = $enabled;
28  $this->path_to_logfile = $this->normalizePath($path_to_logfile);
29  $this->errorlog_dir = $this->normalizePath($errorlog_dir);
30  }
+ Here is the call graph for this function:

Member Function Documentation

◆ getErrorlogDir()

ilLoggingSetupConfig::getErrorlogDir ( )

Definition at line 51 of file class.ilLoggingSetupConfig.php.

References $errorlog_dir.

51  : ?string
52  {
53  return $this->errorlog_dir;
54  }

◆ getPathToLogfile()

ilLoggingSetupConfig::getPathToLogfile ( )

Definition at line 46 of file class.ilLoggingSetupConfig.php.

References $path_to_logfile.

46  : ?string
47  {
49  }

◆ isEnabled()

ilLoggingSetupConfig::isEnabled ( )

Definition at line 41 of file class.ilLoggingSetupConfig.php.

References $enabled.

41  : bool
42  {
43  return $this->enabled;
44  }

◆ normalizePath()

ilLoggingSetupConfig::normalizePath ( ?string  $p)
protected

Definition at line 32 of file class.ilLoggingSetupConfig.php.

Referenced by __construct().

32  : ?string
33  {
34  if (!$p) {
35  return null;
36  }
37  $p = preg_replace("/\\\\/", "/", $p);
38  return preg_replace("%/+$%", "", $p);
39  }
+ Here is the caller graph for this function:

Field Documentation

◆ $enabled

bool ilLoggingSetupConfig::$enabled
protected

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

Referenced by __construct(), and isEnabled().

◆ $errorlog_dir

string ilLoggingSetupConfig::$errorlog_dir
protected

Definition at line 15 of file class.ilLoggingSetupConfig.php.

Referenced by getErrorlogDir().

◆ $path_to_errorlogfiles

string ilLoggingSetupConfig::$path_to_errorlogfiles
protected

Definition at line 14 of file class.ilLoggingSetupConfig.php.

◆ $path_to_logfile

string ilLoggingSetupConfig::$path_to_logfile
protected

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

Referenced by getPathToLogfile().


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