TYPO3 CMS
TYPO3_6-2
Main Page
Related Pages
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
+
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
+
Files
File List
+
File Members
+
All
$
(
_
a
c
d
e
f
h
i
l
o
p
r
s
t
u
x
+
Functions
_
a
c
d
e
f
i
l
o
p
r
s
u
x
+
Variables
$
(
_
a
d
e
h
i
p
r
s
t
Examples
•
All
Classes
Namespaces
Files
Functions
Variables
Pages
IntrospectionProcessor.php
Go to the documentation of this file.
1
<?php
2
namespace
TYPO3\CMS\Core\Log\Processor
;
3
17
use
TYPO3\CMS\Core\Log\LogRecord
;
18
24
class
IntrospectionProcessor
extends
\TYPO3\CMS\Core\Log\Processor\AbstractProcessor
{
25
34
public
function
processLogRecord
(
LogRecord
$logRecord) {
35
$trace = debug_backtrace();
36
// skip first since it's always the current method
37
array_shift($trace);
38
// the call_user_func call is also skipped
39
array_shift($trace);
40
// skip TYPO3\CMS\Core\Log classes
41
// @TODO: Check, if this still works. This was 't3lib_log_' before namespace switch.
42
$i = 0;
43
while
(isset($trace[$i][
'class'
]) && FALSE !== strpos($trace[$i][
'class'
],
'TYPO3\CMS\Core\Log'
)) {
44
$i++;
45
}
46
// we should have the call source now
47
$logRecord->
addData
(array(
48
'file'
=> isset($trace[$i][
'file'
]) ? $trace[$i][
'file'
] : NULL,
49
'line'
=> isset($trace[$i][
'line'
]) ? $trace[$i][
'line'
] : NULL,
50
'class'
=> isset($trace[$i][
'class'
]) ? $trace[$i][
'class'
] : NULL,
51
'function'
=> isset($trace[$i][
'function'
]) ? $trace[$i][
'function'
] : NULL
52
));
53
return
$logRecord;
54
}
55
56
}
TYPO3\CMS\Core\Log\LogRecord\addData
addData(array $data)
Definition:
LogRecord.php:202
LogRecord
TYPO3\CMS\Core\Log\LogRecord
Definition:
LogRecord.php:25
TYPO3\CMS\Core\Log\Processor\AbstractProcessor
Definition:
AbstractProcessor.php:21
TYPO3\CMS\Core\Log\Processor
Definition:
AbstractMemoryProcessor.php:2
TYPO3\CMS\Core\Log\Processor\IntrospectionProcessor
Definition:
IntrospectionProcessor.php:24
TYPO3\CMS\Core\Log\Processor\IntrospectionProcessor\processLogRecord
processLogRecord(LogRecord $logRecord)
Definition:
IntrospectionProcessor.php:34
typo3
sysext
core
Classes
Log
Processor
IntrospectionProcessor.php
Generated on Wed Aug 7 2019 09:52:21 for TYPO3 CMS by
1.8.13