\Monolog\ProcessorMemoryProcessor

Some methods that are common for all memory processors

Summary

Methods
Properties
Constants
__construct()
No public properties found
No constants found
formatBytes()
$realUsage
$useFormatting
N/A
No private methods found
No private properties found
N/A

Properties

$realUsage

$realUsage : boolean

Type

boolean — If true, get the real size of memory allocated from system. Else, only the memory used by emalloc() is reported.

$useFormatting

$useFormatting : boolean

Type

boolean — If true, then format memory size to human readable string (MB, KB, B depending on size)

Methods

__construct()

__construct(boolean  $realUsage = true, boolean  $useFormatting = true) 

Parameters

boolean $realUsage

Set this to true to get the real size of memory allocated from system.

boolean $useFormatting

If true, then format memory size to human readable string (MB, KB, B depending on size)

formatBytes()

formatBytes(integer  $bytes) : string|integer

Formats bytes into a human readable string if $this->useFormatting is true, otherwise return $bytes as is

Parameters

integer $bytes

Returns

string|integer —

Formatted string if $this->useFormatting is true, otherwise return $bytes as is