ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilTraceProcessor Class Reference

Logging factory. More...

+ Collaboration diagram for ilTraceProcessor:

Public Member Functions

 __construct ($a_level)
 
 __invoke (array $record)
 

Private Attributes

 $level = 0
 

Detailed Description

Logging factory.

This class supplies an implementation for the locator. The locator will send its output to ist own frame, enabling more flexibility in the design of the desktop.

Author
Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 15 of file class.ilTraceProcessor.php.

Constructor & Destructor Documentation

◆ __construct()

ilTraceProcessor::__construct (   $a_level)

Definition at line 19 of file class.ilTraceProcessor.php.

20  {
21  $this->level = $a_level;
22  }

Member Function Documentation

◆ __invoke()

ilTraceProcessor::__invoke ( array  $record)
Parameters
array$record
Returns
array

Definition at line 29 of file class.ilTraceProcessor.php.

References array.

30  {
31  if ($record['level'] < $this->level) {
32  return $record;
33  }
34 
35  $trace = debug_backtrace();
36 
37  // shift current method
38  array_shift($trace);
39 
40  // shift internal monolog calls
41  array_shift($trace);
42  array_shift($trace);
43  array_shift($trace);
44  array_shift($trace);
45 
46  $trace_info = $trace[0]['class'] . '::' . $trace[0]['function'] . ':' . $trace[0]['line'];
47 
48  $record['extra'] = array_merge(
49  $record['extra'],
50  array('trace' => $trace_info)
51  );
52  return $record;
53  }
Create styles array
The data for the language used.

Field Documentation

◆ $level

ilTraceProcessor::$level = 0
private

Definition at line 17 of file class.ilTraceProcessor.php.


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