ILIAS  release_8 Revision v8.25-1-g13de6a5eca6
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.

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 }

References $enabled, $path_to_logfile, and normalizePath().

+ Here is the call graph for this function:

Member Function Documentation

◆ getErrorlogDir()

ilLoggingSetupConfig::getErrorlogDir ( )

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

51 : ?string
52 {
54 }

References $errorlog_dir.

◆ getPathToLogfile()

ilLoggingSetupConfig::getPathToLogfile ( )

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

46 : ?string
47 {
49 }

References $path_to_logfile.

◆ isEnabled()

ilLoggingSetupConfig::isEnabled ( )

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

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

References $enabled.

◆ normalizePath()

ilLoggingSetupConfig::normalizePath ( ?string  $p)
protected

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

32 : ?string
33 {
34 if (!$p) {
35 return null;
36 }
37 $p = preg_replace("/\\\\/", "/", $p);
38 return preg_replace("%/+$%", "", $p);
39 }

Referenced by __construct().

+ 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 __construct(), and getPathToLogfile().


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