ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Monolog\Processor\MemoryUsageProcessor Class Reference

Injects memory_get_usage in all records. More...

+ Inheritance diagram for Monolog\Processor\MemoryUsageProcessor:
+ Collaboration diagram for Monolog\Processor\MemoryUsageProcessor:

Public Member Functions

 __invoke (array $record)
 
- Public Member Functions inherited from Monolog\Processor\MemoryProcessor
 __construct ($realUsage=true, $useFormatting=true)
 

Additional Inherited Members

- Protected Member Functions inherited from Monolog\Processor\MemoryProcessor
 formatBytes ($bytes)
 Formats bytes into a human readable string if $this->useFormatting is true, otherwise return $bytes as is. More...
 
- Protected Attributes inherited from Monolog\Processor\MemoryProcessor
 $realUsage
 
 $useFormatting
 

Detailed Description

Injects memory_get_usage in all records.

See also
Monolog::__construct() for options
Author
Rob Jensen

Definition at line 20 of file MemoryUsageProcessor.php.

Member Function Documentation

◆ __invoke()

Monolog\Processor\MemoryUsageProcessor::__invoke ( array  $record)
Parameters
array$record
Returns
array

Implements Monolog\Processor\ProcessorInterface.

Definition at line 26 of file MemoryUsageProcessor.php.

References Monolog\Processor\MemoryProcessor\formatBytes().

27  {
28  $bytes = memory_get_usage($this->realUsage);
29  $formatted = $this->formatBytes($bytes);
30 
31  $record['extra']['memory_usage'] = $formatted;
32 
33  return $record;
34  }
formatBytes($bytes)
Formats bytes into a human readable string if $this->useFormatting is true, otherwise return $bytes a...
+ Here is the call graph for this function:

The documentation for this class was generated from the following file: