Logger

class Logger extends Logger implements LoggerInterface, DebugLoggerInterface

Logger.

Methods

emerg($message, array $context = array()) deprecated
crit($message, array $context = array()) deprecated
err($message, array $context = array()) deprecated
warn($message, array $context = array()) deprecated
array getLogs()

Returns an array of logs.

int countErrors()

Returns the number of errors.

Details

emerg($message, array $context = array()) deprecated

deprecated

since version 2.2, to be removed in 3.0. Use emergency() which is PSR-3 compatible.

Parameters

$message
array $context

crit($message, array $context = array()) deprecated

deprecated

since version 2.2, to be removed in 3.0. Use critical() which is PSR-3 compatible.

Parameters

$message
array $context

err($message, array $context = array()) deprecated

deprecated

since version 2.2, to be removed in 3.0. Use error() which is PSR-3 compatible.

Parameters

$message
array $context

warn($message, array $context = array()) deprecated

deprecated

since version 2.2, to be removed in 3.0. Use warning() which is PSR-3 compatible.

Parameters

$message
array $context

array getLogs()

Returns an array of logs.

A log is an array with the following mandatory keys: timestamp, message, priority, and priorityName. It can also have an optional context key containing an array.

Return Value

array An array of logs

int countErrors()

Returns the number of errors.

Return Value

int The number of errors

© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/2.7/Symfony/Bridge/Monolog/Logger.html