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...
 
 __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.

Reimplemented from SimpleSAML_Stats_Output.

Definition at line 22 of file Log.php.

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 }

References $config.

Member Function Documentation

◆ emit()

sspmod_core_Stats_Output_Log::emit ( array  $data)

Write a stats event.

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

Reimplemented from SimpleSAML_Stats_Output.

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 }

References $data.

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: