ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Log.php
Go to the documentation of this file.
1 <?php
2 
9 
14  private $logger;
15 
16 
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  }
30 
31 
37  public function emit(array $data) {
38  $str_data = json_encode($data);
39  call_user_func($this->logger, 'EVENT ' . $str_data);
40  }
41 
42 }
$config
Definition: bootstrap.php:15
emit(array $data)
Write a stats event.
Definition: Log.php:37
getString($name, $default=self::REQUIRED_OPTION)
This function retrieves a string configuration option.
__construct(SimpleSAML_Configuration $config)
Initialize the output.
Definition: Log.php:22
$data
Definition: bench.php:6