1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-21 08:36:33 +02:00

Adjustments to the Memory processors

This commit is contained in:
Jordi Boggiano
2011-07-19 23:30:31 +02:00
parent 7788c0cee9
commit f9f27ce43f
3 changed files with 11 additions and 17 deletions

View File

@@ -11,17 +11,14 @@
namespace Monolog\Processor;
use Monolog\Processor\MemoryProcessor;
/**
* Injects memory_get_peak_usage in all records
*
* @see Monolog\Processor\MemoryProcessor__construct() for options
* @see Monolog\Processor\MemoryProcessor::__construct() for options
* @author Rob Jensen
*/
class MemoryPeakUsageProcessor extends MemoryProcessor
{
/**
* @param array $record
* @return array
@@ -29,7 +26,7 @@ class MemoryPeakUsageProcessor extends MemoryProcessor
public function __invoke(array $record)
{
$bytes = memory_get_peak_usage($this->realUsage);
$formatted = MemoryProcessor::formatBytes($bytes);
$formatted = self::formatBytes($bytes);
$record['extra'] = array_merge(
$record['extra'],