ILIAS  release_5-2 Revision v5.2.25-18-g3f80b82851
MemoryPeakUsageProcessor.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of the Monolog package.
5  *
6  * (c) Jordi Boggiano <j.boggiano@seld.be>
7  *
8  * For the full copyright and license information, please view the LICENSE
9  * file that was distributed with this source code.
10  */
11 
12 namespace Monolog\Processor;
13 
21 {
26  public function __invoke(array $record)
27  {
28  $bytes = memory_get_peak_usage($this->realUsage);
29  $formatted = $this->formatBytes($bytes);
30 
31  $record['extra']['memory_peak_usage'] = $formatted;
32 
33  return $record;
34  }
35 }
formatBytes($bytes)
Formats bytes into a human readable string if $this->useFormatting is true, otherwise return $bytes a...
Injects memory_get_peak_usage in all records.
Create styles array
The data for the language used.
Some methods that are common for all memory processors.