1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-07 21:56:31 +02:00

Merge pull request #671 from mtopolski/master

added param in InstrospectionProcessor __construct to allow stacktrac…
This commit is contained in:
Jordi Boggiano
2015-10-26 20:39:03 +00:00

View File

@@ -30,15 +30,18 @@ class IntrospectionProcessor
private $skipClassesPartials; private $skipClassesPartials;
private $skipStackFramesCount;
private $skipFunctions = array( private $skipFunctions = array(
'call_user_func', 'call_user_func',
'call_user_func_array', 'call_user_func_array',
); );
public function __construct($level = Logger::DEBUG, array $skipClassesPartials = array()) public function __construct($level = Logger::DEBUG, array $skipClassesPartials = array(), $skipStackFramesCount = 0)
{ {
$this->level = Logger::toMonologLevel($level); $this->level = Logger::toMonologLevel($level);
$this->skipClassesPartials = array_merge(array('Monolog\\'), $skipClassesPartials); $this->skipClassesPartials = array_merge(array('Monolog\\'), $skipClassesPartials);
$this->skipStackFramesCount = $skipStackFramesCount;
} }
/** /**
@@ -77,6 +80,8 @@ class IntrospectionProcessor
break; break;
} }
$i += $this->skipStackFramesCount;
// we should have the call source now // we should have the call source now
$record['extra'] = array_merge( $record['extra'] = array_merge(
$record['extra'], $record['extra'],