ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
Slim_Log Class Reference
+ Collaboration diagram for Slim_Log:

Public Member Functions

 __construct ()
 Constructor. More...
 
 setEnabled ( $enabled)
 Enable or disable logging. More...
 
 isEnabled ()
 Is logging enabled? More...
 
 debug ( $object)
 Log debug message. More...
 
 info ( $object)
 Log info message. More...
 
 warn ( $object)
 Log warn message. More...
 
 error ( $object)
 Log error message. More...
 
 fatal ( $object)
 Log fatal message. More...
 
 setLogger ( $logger)
 Set Logger. More...
 
 getLogger ()
 Get Logger. More...
 

Protected Attributes

 $logger
 
 $enabled
 

Detailed Description

Definition at line 53 of file Log.php.

Constructor & Destructor Documentation

◆ __construct()

Slim_Log::__construct ( )

Constructor.

Definition at line 68 of file Log.php.

68  {
69  $this->enabled = true;
70  }

Member Function Documentation

◆ debug()

Slim_Log::debug (   $object)

Log debug message.

Parameters
mixed$object
Returns
mixed|false What the Logger returns, or false if Logger not set or not enabled

Definition at line 98 of file Log.php.

References isEnabled().

98  {
99  return isset($this->logger) && $this->isEnabled() ? $this->logger->debug($object) : false;
100  }
isEnabled()
Is logging enabled?
Definition: Log.php:89
+ Here is the call graph for this function:

◆ error()

Slim_Log::error (   $object)

Log error message.

Parameters
mixed$object
Returns
mixed|false What the Logger returns, or false if Logger not set or not enabled

Definition at line 125 of file Log.php.

References isEnabled().

125  {
126  return isset($this->logger) && $this->isEnabled() ? $this->logger->error($object) : false;
127  }
isEnabled()
Is logging enabled?
Definition: Log.php:89
+ Here is the call graph for this function:

◆ fatal()

Slim_Log::fatal (   $object)

Log fatal message.

Parameters
mixed$object
Returns
mixed|false What the Logger returns, or false if Logger not set or not enabled

Definition at line 134 of file Log.php.

References isEnabled().

134  {
135  return isset($this->logger) && $this->isEnabled() ? $this->logger->fatal($object) : false;
136  }
isEnabled()
Is logging enabled?
Definition: Log.php:89
+ Here is the call graph for this function:

◆ getLogger()

Slim_Log::getLogger ( )

Get Logger.

Returns
mixed

Definition at line 151 of file Log.php.

References $logger.

151  {
152  return $this->logger;
153  }
$logger
Definition: Log.php:58

◆ info()

Slim_Log::info (   $object)

Log info message.

Parameters
mixed$object
Returns
mixed|false What the Logger returns, or false if Logger not set or not enabled

Definition at line 107 of file Log.php.

References isEnabled().

107  {
108  return isset($this->logger) && $this->isEnabled() ? $this->logger->info($object) : false;
109  }
isEnabled()
Is logging enabled?
Definition: Log.php:89
+ Here is the call graph for this function:

◆ isEnabled()

Slim_Log::isEnabled ( )

Is logging enabled?

Returns
bool

Definition at line 89 of file Log.php.

References $enabled.

Referenced by debug(), error(), fatal(), info(), and warn().

89  {
90  return $this->enabled;
91  }
$enabled
Definition: Log.php:63
+ Here is the caller graph for this function:

◆ setEnabled()

Slim_Log::setEnabled (   $enabled)

Enable or disable logging.

Parameters
bool$enabled
Returns
void

Definition at line 77 of file Log.php.

References $enabled.

77  {
78  if ( $enabled ) {
79  $this->enabled = true;
80  } else {
81  $this->enabled = false;
82  }
83  }
$enabled
Definition: Log.php:63

◆ setLogger()

Slim_Log::setLogger (   $logger)

Set Logger.

Parameters
mixed$logger
Returns
void

Definition at line 143 of file Log.php.

References $logger.

143  {
144  $this->logger = $logger;
145  }
$logger
Definition: Log.php:58

◆ warn()

Slim_Log::warn (   $object)

Log warn message.

Parameters
mixed$object
Returns
mixed|false What the Logger returns, or false if Logger not set or not enabled

Definition at line 116 of file Log.php.

References isEnabled().

116  {
117  return isset($this->logger) && $this->isEnabled() ? $this->logger->warn($object) : false;
118  }
isEnabled()
Is logging enabled?
Definition: Log.php:89
+ Here is the call graph for this function:

Field Documentation

◆ $enabled

Slim_Log::$enabled
protected

Definition at line 63 of file Log.php.

Referenced by isEnabled(), and setEnabled().

◆ $logger

Slim_Log::$logger
protected

Definition at line 58 of file Log.php.

Referenced by getLogger(), and setLogger().


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