1
0
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:
Jordi Boggiano 2013-11-04 00:48:35 -08:00
commit a5010756d9

View File

@ -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;
}