mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-06 13:16:39 +02:00
Merge pull request #266 from aeryaguzov/pid4childs
add right pid for childs
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user