ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 23 of file class.ilLoggingSetupConfig.php.

Constructor & Destructor Documentation

◆ __construct()

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

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

35 {
36 if ($enabled && !$path_to_logfile) {
37 throw new \InvalidArgumentException(
38 "Expected a path to the logfile, if logging is enabled."
39 );
40 }
41 $this->enabled = $enabled;
42 $this->path_to_logfile = $this->normalizePath($path_to_logfile);
43 $this->errorlog_dir = $this->normalizePath($errorlog_dir);
44 }

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

+ Here is the call graph for this function:

Member Function Documentation

◆ getErrorlogDir()

ilLoggingSetupConfig::getErrorlogDir ( )

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

65 : ?string
66 {
68 }

References $errorlog_dir.

◆ getPathToLogfile()

ilLoggingSetupConfig::getPathToLogfile ( )

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

60 : ?string
61 {
63 }

References $path_to_logfile.

◆ isEnabled()

ilLoggingSetupConfig::isEnabled ( )

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

55 : bool
56 {
57 return $this->enabled;
58 }

References $enabled.

◆ normalizePath()

ilLoggingSetupConfig::normalizePath ( ?string  $p)
protected

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

46 : ?string
47 {
48 if (!$p) {
49 return null;
50 }
51 $p = preg_replace("/\\\\/", "/", $p);
52 return preg_replace("%/+$%", "", $p);
53 }

Referenced by __construct().

+ Here is the caller graph for this function:

Field Documentation

◆ $enabled

bool ilLoggingSetupConfig::$enabled
protected

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

Referenced by __construct(), and isEnabled().

◆ $errorlog_dir

string ilLoggingSetupConfig::$errorlog_dir
protected

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

Referenced by getErrorlogDir().

◆ $path_to_errorlogfiles

string ilLoggingSetupConfig::$path_to_errorlogfiles
protected

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

◆ $path_to_logfile

string ilLoggingSetupConfig::$path_to_logfile
protected

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

Referenced by __construct(), and getPathToLogfile().


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