ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
sspmod_core_Stats_Output_Log Class Reference
+ Inheritance diagram for sspmod_core_Stats_Output_Log:
+ Collaboration diagram for sspmod_core_Stats_Output_Log:

Public Member Functions

 __construct (SimpleSAML_Configuration $config)
 Initialize the output. More...
 
 emit (array $data)
 Write a stats event. More...
 
- Public Member Functions inherited from SimpleSAML_Stats_Output
 __construct (SimpleSAML_Configuration $config)
 Initialize the output. More...
 
 emit (array $data)
 Write a stats event. More...
 

Private Attributes

 $logger
 

Detailed Description

Definition at line 8 of file Log.php.

Constructor & Destructor Documentation

◆ __construct()

sspmod_core_Stats_Output_Log::__construct ( SimpleSAML_Configuration  $config)

Initialize the output.

Parameters
SimpleSAML_Configuration$configThe configuration for this output.

Definition at line 22 of file Log.php.

References array, and SimpleSAML_Configuration\getString().

22  {
23 
24  $logLevel = $config->getString('level', 'notice');
25  $this->logger = array('SimpleSAML\Logger', $logLevel);
26  if (!is_callable($this->logger)) {
27  throw new Exception('Invalid log level: ' . var_export($logLevel, TRUE));
28  }
29  }
Create styles array
The data for the language used.
getString($name, $default=self::REQUIRED_OPTION)
This function retrieves a string configuration option.
+ Here is the call graph for this function:

Member Function Documentation

◆ emit()

sspmod_core_Stats_Output_Log::emit ( array  $data)

Write a stats event.

Parameters
string$dataThe event (as a JSON string).

Definition at line 37 of file Log.php.

37  {
38  $str_data = json_encode($data);
39  call_user_func($this->logger, 'EVENT ' . $str_data);
40  }

Field Documentation

◆ $logger

sspmod_core_Stats_Output_Log::$logger
private

Definition at line 14 of file Log.php.


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