ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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

 $enabled
 
 $path_to_logfile
 
 $path_to_errorlogfiles
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

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

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

28 {
29 if ($enabled && !$path_to_logfile) {
30 throw new \InvalidArgumentException(
31 "Expected a path to the logfile, if logging is enabled."
32 );
33 }
34 $this->enabled = $enabled;
35 $this->path_to_logfile = $this->normalizePath($path_to_logfile);
36 $this->errorlog_dir = $this->normalizePath($errorlog_dir);
37 }

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

+ Here is the call graph for this function:

Member Function Documentation

◆ getErrorlogDir()

ilLoggingSetupConfig::getErrorlogDir ( )

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

58 : ?string
59 {
60 return $this->errorlog_dir;
61 }

◆ getPathToLogfile()

ilLoggingSetupConfig::getPathToLogfile ( )

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

53 : ?string
54 {
56 }

References $path_to_logfile.

◆ isEnabled()

ilLoggingSetupConfig::isEnabled ( )

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

48 : bool
49 {
50 return $this->enabled;
51 }

References $enabled.

◆ normalizePath()

ilLoggingSetupConfig::normalizePath ( ?string  $p)
protected

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

39 : ?string
40 {
41 if (!$p) {
42 return null;
43 }
44 $p = preg_replace("/\\\\/", "/", $p);
45 return preg_replace("%/+$%", "", $p);
46 }

Referenced by __construct().

+ Here is the caller graph for this function:

Field Documentation

◆ $enabled

ilLoggingSetupConfig::$enabled
protected

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

Referenced by __construct(), and isEnabled().

◆ $path_to_errorlogfiles

ilLoggingSetupConfig::$path_to_errorlogfiles
protected

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

◆ $path_to_logfile

ilLoggingSetupConfig::$path_to_logfile
protected

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

Referenced by __construct(), and getPathToLogfile().


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