mirror of
https://github.com/Seldaek/monolog.git
synced 2025-02-24 15:02:28 +01:00
Merge pull request #266 from aeryaguzov/pid4childs
add right pid for childs
This commit is contained in:
commit
a5010756d9
@ -18,22 +18,13 @@ namespace Monolog\Processor;
|
||||
*/
|
||||
class ProcessIdProcessor
|
||||
{
|
||||
private static $pid;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
if (null === self::$pid) {
|
||||
self::$pid = getmypid();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $record
|
||||
* @return array
|
||||
*/
|
||||
public function __invoke(array $record)
|
||||
{
|
||||
$record['extra']['process_id'] = self::$pid;
|
||||
$record['extra']['process_id'] = getmypid();
|
||||
|
||||
return $record;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user