ILIAS  trunk Revision v11.0_alpha-1846-g895b5f47236
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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.

References $enabled, and normalizePath().

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  }
+ Here is the call graph for this function:

Member Function Documentation

◆ getErrorlogDir()

ilLoggingSetupConfig::getErrorlogDir ( )

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

References $errorlog_dir.

65  : ?string
66  {
67  return $this->errorlog_dir;
68  }

◆ getPathToLogfile()

ilLoggingSetupConfig::getPathToLogfile ( )

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

References $path_to_logfile.

60  : ?string
61  {
63  }

◆ isEnabled()

ilLoggingSetupConfig::isEnabled ( )

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

References $enabled.

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

◆ normalizePath()

ilLoggingSetupConfig::normalizePath ( ?string  $p)
protected

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

References null.

Referenced by __construct().

46  : ?string
47  {
48  if (!$p) {
49  return null;
50  }
51  $p = preg_replace("/\\\\/", "/", $p);
52  return preg_replace("%/+$%", "", $p);
53  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ 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 getPathToLogfile().


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