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

Monolog log channel. More...

+ Inheritance diagram for Monolog\Logger:
+ Collaboration diagram for Monolog\Logger:

Public Member Functions

 __construct ($name, array $handlers=array(), array $processors=array())
 
 getName ()
 
 withName ($name)
 Return a new cloned instance with the name changed. More...
 
 pushHandler (HandlerInterface $handler)
 Pushes a handler on to the stack. More...
 
 popHandler ()
 Pops a handler from the stack. More...
 
 setHandlers (array $handlers)
 Set handlers, replacing all existing ones. More...
 
 getHandlers ()
 
 pushProcessor ($callback)
 Adds a processor on to the stack. More...
 
 popProcessor ()
 Removes the processor on top of the stack and returns it. More...
 
 getProcessors ()
 
 useMicrosecondTimestamps ($micro)
 Control the use of microsecond resolution timestamps in the 'datetime' member of new records. More...
 
 addRecord ($level, $message, array $context=array())
 Adds a log record. More...
 
 close ()
 Ends a log cycle and frees all resources used by handlers. More...
 
 reset ()
 Ends a log cycle and resets all handlers and processors to their initial state. More...
 
 addDebug ($message, array $context=array())
 Adds a log record at the DEBUG level. More...
 
 addInfo ($message, array $context=array())
 Adds a log record at the INFO level. More...
 
 addNotice ($message, array $context=array())
 Adds a log record at the NOTICE level. More...
 
 addWarning ($message, array $context=array())
 Adds a log record at the WARNING level. More...
 
 addError ($message, array $context=array())
 Adds a log record at the ERROR level. More...
 
 addCritical ($message, array $context=array())
 Adds a log record at the CRITICAL level. More...
 
 addAlert ($message, array $context=array())
 Adds a log record at the ALERT level. More...
 
 addEmergency ($message, array $context=array())
 Adds a log record at the EMERGENCY level. More...
 
 isHandling ($level)
 Checks whether the Logger has a handler that listens on the given level. More...
 
 setExceptionHandler ($callback)
 Set a custom exception handler. More...
 
 getExceptionHandler ()
 
 log ($level, $message, array $context=array())
 Adds a log record at an arbitrary level. More...
 
 debug ($message, array $context=array())
 Adds a log record at the DEBUG level. More...
 
 info ($message, array $context=array())
 Adds a log record at the INFO level. More...
 
 notice ($message, array $context=array())
 Adds a log record at the NOTICE level. More...
 
 warn ($message, array $context=array())
 Adds a log record at the WARNING level. More...
 
 warning ($message, array $context=array())
 Adds a log record at the WARNING level. More...
 
 err ($message, array $context=array())
 Adds a log record at the ERROR level. More...
 
 error ($message, array $context=array())
 Adds a log record at the ERROR level. More...
 
 crit ($message, array $context=array())
 Adds a log record at the CRITICAL level. More...
 
 critical ($message, array $context=array())
 Adds a log record at the CRITICAL level. More...
 
 alert ($message, array $context=array())
 Adds a log record at the ALERT level. More...
 
 emerg ($message, array $context=array())
 Adds a log record at the EMERGENCY level. More...
 
 emergency ($message, array $context=array())
 Adds a log record at the EMERGENCY level. More...
 

Static Public Member Functions

static getLevels ()
 Gets all supported logging levels. More...
 
static getLevelName ($level)
 Gets the name of the logging level. More...
 
static toMonologLevel ($level)
 Converts PSR-3 levels to Monolog ones if necessary. More...
 
static setTimezone (\DateTimeZone $tz)
 Set the timezone to be used for the timestamp of log records. More...
 

Data Fields

const DEBUG = 100
 Detailed debug information. More...
 
const INFO = 200
 Interesting events. More...
 
const NOTICE = 250
 Uncommon events. More...
 
const WARNING = 300
 Exceptional occurrences that are not errors. More...
 
const ERROR = 400
 Runtime errors. More...
 
const CRITICAL = 500
 Critical conditions. More...
 
const ALERT = 550
 Action must be taken immediately. More...
 
const EMERGENCY = 600
 Urgent alert. More...
 
const API = 1
 

Protected Member Functions

 handleException (Exception $e, array $record)
 Delegates exception management to the custom exception handler, or throws the exception if no custom handler is set. More...
 

Protected Attributes

 $name
 
 $handlers
 
 $processors
 
 $microsecondTimestamps = true
 
 $exceptionHandler
 

Static Protected Attributes

static $levels
 
static $timezone
 

Detailed Description

Monolog log channel.

It contains a stack of Handlers and a stack of Processors, and uses them to store records that are added to it.

Author
Jordi Boggiano j.bog.nosp@m.gian.nosp@m.o@sel.nosp@m.d.be

Definition at line 28 of file Logger.php.

Constructor & Destructor Documentation

◆ __construct()

Monolog\Logger::__construct (   $name,
array  $handlers = array(),
array  $processors = array() 
)
Parameters
string$nameThe logging channel
HandlerInterface[]$handlers Optional stack of handlers, the first one in the array is called first, etc.
callable[]$processors Optional array of processors

Definition at line 147 of file Logger.php.

References $name.

148  {
149  $this->name = $name;
150  $this->setHandlers($handlers);
151  $this->processors = $processors;
152  }
setHandlers(array $handlers)
Set handlers, replacing all existing ones.
Definition: Logger.php:210

Member Function Documentation

◆ addAlert()

Monolog\Logger::addAlert (   $message,
array  $context = array() 
)

Adds a log record at the ALERT level.

Parameters
string$messageThe log message
array$contextThe log context
Returns
bool Whether the record has been processed

Definition at line 480 of file Logger.php.

References $context, and $message.

481  {
482  return $this->addRecord(static::ALERT, $message, $context);
483  }
$context
Definition: webdav.php:25
catch(Exception $e) $message
addRecord($level, $message, array $context=array())
Adds a log record.
Definition: Logger.php:292

◆ addCritical()

Monolog\Logger::addCritical (   $message,
array  $context = array() 
)

Adds a log record at the CRITICAL level.

Parameters
string$messageThe log message
array$contextThe log context
Returns
bool Whether the record has been processed

Definition at line 468 of file Logger.php.

References $context, and $message.

469  {
470  return $this->addRecord(static::CRITICAL, $message, $context);
471  }
$context
Definition: webdav.php:25
catch(Exception $e) $message
addRecord($level, $message, array $context=array())
Adds a log record.
Definition: Logger.php:292

◆ addDebug()

Monolog\Logger::addDebug (   $message,
array  $context = array() 
)

Adds a log record at the DEBUG level.

Parameters
string$messageThe log message
array$contextThe log context
Returns
bool Whether the record has been processed

Definition at line 408 of file Logger.php.

References $context, $message, and DEBUG.

409  {
410  return $this->addRecord(static::DEBUG, $message, $context);
411  }
$context
Definition: webdav.php:25
const DEBUG
catch(Exception $e) $message
addRecord($level, $message, array $context=array())
Adds a log record.
Definition: Logger.php:292

◆ addEmergency()

Monolog\Logger::addEmergency (   $message,
array  $context = array() 
)

Adds a log record at the EMERGENCY level.

Parameters
string$messageThe log message
array$contextThe log context
Returns
bool Whether the record has been processed

Definition at line 492 of file Logger.php.

References $context, and $message.

493  {
494  return $this->addRecord(static::EMERGENCY, $message, $context);
495  }
$context
Definition: webdav.php:25
catch(Exception $e) $message
addRecord($level, $message, array $context=array())
Adds a log record.
Definition: Logger.php:292

◆ addError()

Monolog\Logger::addError (   $message,
array  $context = array() 
)

Adds a log record at the ERROR level.

Parameters
string$messageThe log message
array$contextThe log context
Returns
bool Whether the record has been processed

Definition at line 456 of file Logger.php.

References $context, and $message.

457  {
458  return $this->addRecord(static::ERROR, $message, $context);
459  }
$context
Definition: webdav.php:25
catch(Exception $e) $message
addRecord($level, $message, array $context=array())
Adds a log record.
Definition: Logger.php:292

◆ addInfo()

Monolog\Logger::addInfo (   $message,
array  $context = array() 
)

Adds a log record at the INFO level.

Parameters
string$messageThe log message
array$contextThe log context
Returns
bool Whether the record has been processed

Definition at line 420 of file Logger.php.

References $context, and $message.

421  {
422  return $this->addRecord(static::INFO, $message, $context);
423  }
$context
Definition: webdav.php:25
catch(Exception $e) $message
addRecord($level, $message, array $context=array())
Adds a log record.
Definition: Logger.php:292

◆ addNotice()

Monolog\Logger::addNotice (   $message,
array  $context = array() 
)

Adds a log record at the NOTICE level.

Parameters
string$messageThe log message
array$contextThe log context
Returns
bool Whether the record has been processed

Definition at line 432 of file Logger.php.

References $context, and $message.

433  {
434  return $this->addRecord(static::NOTICE, $message, $context);
435  }
$context
Definition: webdav.php:25
catch(Exception $e) $message
addRecord($level, $message, array $context=array())
Adds a log record.
Definition: Logger.php:292

◆ addRecord()

Monolog\Logger::addRecord (   $level,
  $message,
array  $context = array() 
)

Adds a log record.

Parameters
int$levelThe logging level
string$messageThe log message
array$contextThe log context
Returns
bool Whether the record has been processed

Definition at line 292 of file Logger.php.

References $context, $handler, $message, and DEBUG.

293  {
294  if (!$this->handlers) {
295  $this->pushHandler(new StreamHandler('php://stderr', static::DEBUG));
296  }
297 
298  $levelName = static::getLevelName($level);
299 
300  // check if any handler will handle this message so we can return early and save cycles
301  $handlerKey = null;
302  reset($this->handlers);
303  while ($handler = current($this->handlers)) {
304  if ($handler->isHandling(array('level' => $level))) {
305  $handlerKey = key($this->handlers);
306  break;
307  }
308 
309  next($this->handlers);
310  }
311 
312  if (null === $handlerKey) {
313  return false;
314  }
315 
316  if (!static::$timezone) {
317  static::$timezone = new \DateTimeZone(date_default_timezone_get() ?: 'UTC');
318  }
319 
320  // php7.1+ always has microseconds enabled, so we do not need this hack
321  if ($this->microsecondTimestamps && PHP_VERSION_ID < 70100) {
322  $ts = \DateTime::createFromFormat('U.u', sprintf('%.6F', microtime(true)), static::$timezone);
323  } else {
324  $ts = new \DateTime(null, static::$timezone);
325  }
326  $ts->setTimezone(static::$timezone);
327 
328  $record = array(
329  'message' => (string) $message,
330  'context' => $context,
331  'level' => $level,
332  'level_name' => $levelName,
333  'channel' => $this->name,
334  'datetime' => $ts,
335  'extra' => array(),
336  );
337 
338  try {
339  foreach ($this->processors as $processor) {
340  $record = call_user_func($processor, $record);
341  }
342 
343  while ($handler = current($this->handlers)) {
344  if (true === $handler->handle($record)) {
345  break;
346  }
347 
348  next($this->handlers);
349  }
350  } catch (Exception $e) {
351  $this->handleException($e, $record);
352  }
353 
354  return true;
355  }
$context
Definition: webdav.php:25
const DEBUG
pushHandler(HandlerInterface $handler)
Pushes a handler on to the stack.
Definition: Logger.php:181
catch(Exception $e) $message
handleException(Exception $e, array $record)
Delegates exception management to the custom exception handler, or throws the exception if no custom ...
Definition: Logger.php:586
reset()
Ends a log cycle and resets all handlers and processors to their initial state.
Definition: Logger.php:386
$handler

◆ addWarning()

Monolog\Logger::addWarning (   $message,
array  $context = array() 
)

Adds a log record at the WARNING level.

Parameters
string$messageThe log message
array$contextThe log context
Returns
bool Whether the record has been processed

Definition at line 444 of file Logger.php.

References $context, and $message.

445  {
446  return $this->addRecord(static::WARNING, $message, $context);
447  }
$context
Definition: webdav.php:25
catch(Exception $e) $message
addRecord($level, $message, array $context=array())
Adds a log record.
Definition: Logger.php:292

◆ alert()

Monolog\Logger::alert (   $message,
array  $context = array() 
)

Adds a log record at the ALERT level.

This method allows for compatibility with common interfaces.

Parameters
string$messageThe log message
array$contextThe log context
Returns
bool Whether the record has been processed

Implements Psr\Log\LoggerInterface.

Definition at line 747 of file Logger.php.

References $context, and $message.

748  {
749  return $this->addRecord(static::ALERT, $message, $context);
750  }
$context
Definition: webdav.php:25
catch(Exception $e) $message
addRecord($level, $message, array $context=array())
Adds a log record.
Definition: Logger.php:292

◆ close()

Monolog\Logger::close ( )

Ends a log cycle and frees all resources used by handlers.

Closing a Handler means flushing all buffers and freeing any open resources/handles. Handlers that have been closed should be able to accept log records again and re-open themselves on demand, but this may not always be possible depending on implementation.

This is useful at the end of a request and will be called automatically on every handler when they get destructed.

Definition at line 367 of file Logger.php.

References $handler.

368  {
369  foreach ($this->handlers as $handler) {
370  if (method_exists($handler, 'close')) {
371  $handler->close();
372  }
373  }
374  }
$handler

◆ crit()

Monolog\Logger::crit (   $message,
array  $context = array() 
)

Adds a log record at the CRITICAL level.

This method allows for compatibility with common interfaces.

Parameters
string$messageThe log message
array$contextThe log context
Returns
bool Whether the record has been processed

Definition at line 719 of file Logger.php.

References $context, and $message.

720  {
721  return $this->addRecord(static::CRITICAL, $message, $context);
722  }
$context
Definition: webdav.php:25
catch(Exception $e) $message
addRecord($level, $message, array $context=array())
Adds a log record.
Definition: Logger.php:292

◆ critical()

Monolog\Logger::critical (   $message,
array  $context = array() 
)

Adds a log record at the CRITICAL level.

This method allows for compatibility with common interfaces.

Parameters
string$messageThe log message
array$contextThe log context
Returns
bool Whether the record has been processed

Implements Psr\Log\LoggerInterface.

Definition at line 733 of file Logger.php.

References $context, and $message.

734  {
735  return $this->addRecord(static::CRITICAL, $message, $context);
736  }
$context
Definition: webdav.php:25
catch(Exception $e) $message
addRecord($level, $message, array $context=array())
Adds a log record.
Definition: Logger.php:292

◆ debug()

Monolog\Logger::debug (   $message,
array  $context = array() 
)

Adds a log record at the DEBUG level.

This method allows for compatibility with common interfaces.

Parameters
string$messageThe log message
array$contextThe log context
Returns
bool Whether the record has been processed

Implements Psr\Log\LoggerInterface.

Definition at line 621 of file Logger.php.

References $context, $message, and DEBUG.

622  {
623  return $this->addRecord(static::DEBUG, $message, $context);
624  }
$context
Definition: webdav.php:25
const DEBUG
catch(Exception $e) $message
addRecord($level, $message, array $context=array())
Adds a log record.
Definition: Logger.php:292

◆ emerg()

Monolog\Logger::emerg (   $message,
array  $context = array() 
)

Adds a log record at the EMERGENCY level.

This method allows for compatibility with common interfaces.

Parameters
string$messageThe log message
array$contextThe log context
Returns
bool Whether the record has been processed

Definition at line 761 of file Logger.php.

References $context, and $message.

762  {
763  return $this->addRecord(static::EMERGENCY, $message, $context);
764  }
$context
Definition: webdav.php:25
catch(Exception $e) $message
addRecord($level, $message, array $context=array())
Adds a log record.
Definition: Logger.php:292

◆ emergency()

Monolog\Logger::emergency (   $message,
array  $context = array() 
)

Adds a log record at the EMERGENCY level.

This method allows for compatibility with common interfaces.

Parameters
string$messageThe log message
array$contextThe log context
Returns
bool Whether the record has been processed

Implements Psr\Log\LoggerInterface.

Definition at line 775 of file Logger.php.

References $context, and $message.

776  {
777  return $this->addRecord(static::EMERGENCY, $message, $context);
778  }
$context
Definition: webdav.php:25
catch(Exception $e) $message
addRecord($level, $message, array $context=array())
Adds a log record.
Definition: Logger.php:292

◆ err()

Monolog\Logger::err (   $message,
array  $context = array() 
)

Adds a log record at the ERROR level.

This method allows for compatibility with common interfaces.

Parameters
string$messageThe log message
array$contextThe log context
Returns
bool Whether the record has been processed

Definition at line 691 of file Logger.php.

References $context, and $message.

692  {
693  return $this->addRecord(static::ERROR, $message, $context);
694  }
$context
Definition: webdav.php:25
catch(Exception $e) $message
addRecord($level, $message, array $context=array())
Adds a log record.
Definition: Logger.php:292

◆ error()

Monolog\Logger::error (   $message,
array  $context = array() 
)

Adds a log record at the ERROR level.

This method allows for compatibility with common interfaces.

Parameters
string$messageThe log message
array$contextThe log context
Returns
bool Whether the record has been processed

Implements Psr\Log\LoggerInterface.

Definition at line 705 of file Logger.php.

References $context, and $message.

706  {
707  return $this->addRecord(static::ERROR, $message, $context);
708  }
$context
Definition: webdav.php:25
catch(Exception $e) $message
addRecord($level, $message, array $context=array())
Adds a log record.
Definition: Logger.php:292

◆ getExceptionHandler()

Monolog\Logger::getExceptionHandler ( )
Returns
callable

Definition at line 577 of file Logger.php.

578  {
580  }

◆ getHandlers()

Monolog\Logger::getHandlers ( )
Returns
HandlerInterface[]

Definition at line 223 of file Logger.php.

224  {
225  return $this->handlers;
226  }

◆ getLevelName()

◆ getLevels()

static Monolog\Logger::getLevels ( )
static

Gets all supported logging levels.

Returns
array Assoc array with human-readable level names => level codes.

Definition at line 502 of file Logger.php.

Referenced by Monolog\Handler\FilterHandler\setAcceptedLevels().

503  {
504  return array_flip(static::$levels);
505  }
+ Here is the caller graph for this function:

◆ getName()

Monolog\Logger::getName ( )
Returns
string

Definition at line 157 of file Logger.php.

References $name.

Referenced by Monolog\Registry\addLogger().

158  {
159  return $this->name;
160  }
+ Here is the caller graph for this function:

◆ getProcessors()

Monolog\Logger::getProcessors ( )
Returns
callable[]

Definition at line 261 of file Logger.php.

262  {
263  return $this->processors;
264  }

◆ handleException()

Monolog\Logger::handleException ( Exception  $e,
array  $record 
)
protected

Delegates exception management to the custom exception handler, or throws the exception if no custom handler is set.

Definition at line 586 of file Logger.php.

587  {
588  if (!$this->exceptionHandler) {
589  throw $e;
590  }
591 
592  call_user_func($this->exceptionHandler, $e, $record);
593  }

◆ info()

Monolog\Logger::info (   $message,
array  $context = array() 
)

Adds a log record at the INFO level.

This method allows for compatibility with common interfaces.

Parameters
string$messageThe log message
array$contextThe log context
Returns
bool Whether the record has been processed

Implements Psr\Log\LoggerInterface.

Definition at line 635 of file Logger.php.

References $context, and $message.

636  {
637  return $this->addRecord(static::INFO, $message, $context);
638  }
$context
Definition: webdav.php:25
catch(Exception $e) $message
addRecord($level, $message, array $context=array())
Adds a log record.
Definition: Logger.php:292

◆ isHandling()

Monolog\Logger::isHandling (   $level)

Checks whether the Logger has a handler that listens on the given level.

Parameters
int$level
Returns
bool

Definition at line 543 of file Logger.php.

References $handler.

544  {
545  $record = array(
546  'level' => $level,
547  );
548 
549  foreach ($this->handlers as $handler) {
550  if ($handler->isHandling($record)) {
551  return true;
552  }
553  }
554 
555  return false;
556  }
$handler

◆ log()

Monolog\Logger::log (   $level,
  $message,
array  $context = array() 
)

Adds a log record at an arbitrary level.

This method allows for compatibility with common interfaces.

Parameters
mixed$levelThe log level
string$messageThe log message
array$contextThe log context
Returns
bool Whether the record has been processed

Implements Psr\Log\LoggerInterface.

Definition at line 605 of file Logger.php.

References $context, and $message.

606  {
607  $level = static::toMonologLevel($level);
608 
609  return $this->addRecord($level, $message, $context);
610  }
$context
Definition: webdav.php:25
catch(Exception $e) $message
addRecord($level, $message, array $context=array())
Adds a log record.
Definition: Logger.php:292

◆ notice()

Monolog\Logger::notice (   $message,
array  $context = array() 
)

Adds a log record at the NOTICE level.

This method allows for compatibility with common interfaces.

Parameters
string$messageThe log message
array$contextThe log context
Returns
bool Whether the record has been processed

Implements Psr\Log\LoggerInterface.

Definition at line 649 of file Logger.php.

References $context, and $message.

650  {
651  return $this->addRecord(static::NOTICE, $message, $context);
652  }
$context
Definition: webdav.php:25
catch(Exception $e) $message
addRecord($level, $message, array $context=array())
Adds a log record.
Definition: Logger.php:292

◆ popHandler()

Monolog\Logger::popHandler ( )

Pops a handler from the stack.

Returns
HandlerInterface

Definition at line 193 of file Logger.php.

194  {
195  if (!$this->handlers) {
196  throw new \LogicException('You tried to pop from an empty handler stack.');
197  }
198 
199  return array_shift($this->handlers);
200  }

◆ popProcessor()

Monolog\Logger::popProcessor ( )

Removes the processor on top of the stack and returns it.

Returns
callable

Definition at line 249 of file Logger.php.

250  {
251  if (!$this->processors) {
252  throw new \LogicException('You tried to pop from an empty processor stack.');
253  }
254 
255  return array_shift($this->processors);
256  }

◆ pushHandler()

Monolog\Logger::pushHandler ( HandlerInterface  $handler)

Pushes a handler on to the stack.

Parameters
HandlerInterface$handler
Returns
$this

Definition at line 181 of file Logger.php.

182  {
183  array_unshift($this->handlers, $handler);
184 
185  return $this;
186  }
$handler

◆ pushProcessor()

Monolog\Logger::pushProcessor (   $callback)

Adds a processor on to the stack.

Parameters
callable$callback
Returns
$this

Definition at line 234 of file Logger.php.

235  {
236  if (!is_callable($callback)) {
237  throw new \InvalidArgumentException('Processors must be valid callables (callback or object with an __invoke method), '.var_export($callback, true).' given');
238  }
239  array_unshift($this->processors, $callback);
240 
241  return $this;
242  }

◆ reset()

Monolog\Logger::reset ( )

Ends a log cycle and resets all handlers and processors to their initial state.

Resetting a Handler or a Processor means flushing/cleaning all buffers, resetting internal state, and getting it back to a state in which it can receive log records again.

This is useful in case you want to avoid logs leaking between two requests or jobs when you have a long running process like a worker or an application server serving multiple requests in one process.

Implements Monolog\ResettableInterface.

Definition at line 386 of file Logger.php.

References $handler.

387  {
388  foreach ($this->handlers as $handler) {
389  if ($handler instanceof ResettableInterface) {
390  $handler->reset();
391  }
392  }
393 
394  foreach ($this->processors as $processor) {
395  if ($processor instanceof ResettableInterface) {
396  $processor->reset();
397  }
398  }
399  }
$handler

◆ setExceptionHandler()

Monolog\Logger::setExceptionHandler (   $callback)

Set a custom exception handler.

Parameters
callable$callback
Returns
$this

Definition at line 564 of file Logger.php.

565  {
566  if (!is_callable($callback)) {
567  throw new \InvalidArgumentException('Exception handler must be valid callable (callback or object with an __invoke method), '.var_export($callback, true).' given');
568  }
569  $this->exceptionHandler = $callback;
570 
571  return $this;
572  }

◆ setHandlers()

Monolog\Logger::setHandlers ( array  $handlers)

Set handlers, replacing all existing ones.

If a map is passed, keys will be ignored.

Parameters
HandlerInterface[]$handlers
Returns
$this

Definition at line 210 of file Logger.php.

References $handler.

211  {
212  $this->handlers = array();
213  foreach (array_reverse($handlers) as $handler) {
214  $this->pushHandler($handler);
215  }
216 
217  return $this;
218  }
pushHandler(HandlerInterface $handler)
Pushes a handler on to the stack.
Definition: Logger.php:181
$handler

◆ setTimezone()

static Monolog\Logger::setTimezone ( \DateTimeZone  $tz)
static

Set the timezone to be used for the timestamp of log records.

This is stored globally for all Logger instances

Parameters
\DateTimeZone$tzTimezone object

Definition at line 787 of file Logger.php.

References $tz.

788  {
789  self::$timezone = $tz;
790  }

◆ toMonologLevel()

static Monolog\Logger::toMonologLevel (   $level)
static

Converts PSR-3 levels to Monolog ones if necessary.

Parameters
string|intLevel number (monolog) or name (PSR-3)
Returns
int

Definition at line 528 of file Logger.php.

Referenced by Monolog\Handler\FingersCrossed\ErrorLevelActivationStrategy\__construct(), Monolog\Processor\MercurialProcessor\__construct(), Monolog\Processor\GitProcessor\__construct(), Monolog\Processor\IntrospectionProcessor\__construct(), Monolog\Handler\FingersCrossed\ChannelLevelActivationStrategy\__construct(), Monolog\Handler\FingersCrossedHandler\__construct(), Monolog\Handler\DeduplicationHandler\__construct(), Monolog\Handler\PushoverHandler\__construct(), Monolog\Handler\FilterHandler\setAcceptedLevels(), and Monolog\Handler\AbstractHandler\setLevel().

529  {
530  if (is_string($level) && defined(__CLASS__.'::'.strtoupper($level))) {
531  return constant(__CLASS__.'::'.strtoupper($level));
532  }
533 
534  return $level;
535  }
+ Here is the caller graph for this function:

◆ useMicrosecondTimestamps()

Monolog\Logger::useMicrosecondTimestamps (   $micro)

Control the use of microsecond resolution timestamps in the 'datetime' member of new records.

Generating microsecond resolution timestamps by calling microtime(true), formatting the result via sprintf() and then parsing the resulting string via ::createFromFormat() can incur a measurable runtime overhead vs simple usage of DateTime to capture a second resolution timestamp in systems which generate a large number of log events.

Parameters
bool$microTrue to use microtime() to create timestamps

Definition at line 279 of file Logger.php.

280  {
281  $this->microsecondTimestamps = (bool) $micro;
282  }

◆ warn()

Monolog\Logger::warn (   $message,
array  $context = array() 
)

Adds a log record at the WARNING level.

This method allows for compatibility with common interfaces.

Parameters
string$messageThe log message
array$contextThe log context
Returns
bool Whether the record has been processed

Definition at line 663 of file Logger.php.

References $context, and $message.

664  {
665  return $this->addRecord(static::WARNING, $message, $context);
666  }
$context
Definition: webdav.php:25
catch(Exception $e) $message
addRecord($level, $message, array $context=array())
Adds a log record.
Definition: Logger.php:292

◆ warning()

Monolog\Logger::warning (   $message,
array  $context = array() 
)

Adds a log record at the WARNING level.

This method allows for compatibility with common interfaces.

Parameters
string$messageThe log message
array$contextThe log context
Returns
bool Whether the record has been processed

Implements Psr\Log\LoggerInterface.

Definition at line 677 of file Logger.php.

References $context, and $message.

678  {
679  return $this->addRecord(static::WARNING, $message, $context);
680  }
$context
Definition: webdav.php:25
catch(Exception $e) $message
addRecord($level, $message, array $context=array())
Adds a log record.
Definition: Logger.php:292

◆ withName()

Monolog\Logger::withName (   $name)

Return a new cloned instance with the name changed.

Returns
static

Definition at line 167 of file Logger.php.

References $name.

168  {
169  $new = clone $this;
170  $new->name = $name;
171 
172  return $new;
173  }

Field Documentation

◆ $exceptionHandler

Monolog\Logger::$exceptionHandler
protected

Definition at line 140 of file Logger.php.

◆ $handlers

Monolog\Logger::$handlers
protected

Definition at line 121 of file Logger.php.

◆ $levels

Monolog\Logger::$levels
staticprotected
Initial value:
= array(
self::DEBUG => 'DEBUG',
self::INFO => 'INFO',
self::NOTICE => 'NOTICE',
self::WARNING => 'WARNING',
self::ERROR => 'ERROR',
self::CRITICAL => 'CRITICAL',
self::ALERT => 'ALERT',
self::EMERGENCY => 'EMERGENCY',
)

Definition at line 95 of file Logger.php.

◆ $microsecondTimestamps

Monolog\Logger::$microsecondTimestamps = true
protected

Definition at line 135 of file Logger.php.

◆ $name

Monolog\Logger::$name
protected

Definition at line 114 of file Logger.php.

◆ $processors

Monolog\Logger::$processors
protected

Definition at line 130 of file Logger.php.

◆ $timezone

Monolog\Logger::$timezone
staticprotected

Definition at line 109 of file Logger.php.

◆ ALERT

const Monolog\Logger::ALERT = 550

◆ API

const Monolog\Logger::API = 1

Definition at line 88 of file Logger.php.

◆ CRITICAL

const Monolog\Logger::CRITICAL = 500

Critical conditions.

Example: Application component unavailable, unexpected exception.

Definition at line 65 of file Logger.php.

Referenced by Monolog\Handler\Slack\SlackRecordTest\dataGetAttachmentColor(), Monolog\Handler\HipChatHandlerTest\provideBatchRecords(), Monolog\Handler\SlackHandlerTest\provideLevelColors(), Monolog\Handler\HipChatHandlerTest\provideLevelColors(), Monolog\Handler\FilterHandlerTest\testAcceptedLevelApi(), Monolog\Handler\Slack\SlackRecordTest\testContextHasException(), Monolog\Handler\HipChatHandlerTest\testCreateWithTooLongNameV2(), Monolog\Handler\DeduplicationHandlerTest\testFlushPassthruIfEmptyLog(), Monolog\Handler\DeduplicationHandlerTest\testFlushPassthruIfLogTooOld(), Monolog\Handler\DeduplicationHandlerTest\testFlushSkipsIfLogExists(), Monolog\Formatter\ChromePHPFormatterTest\testFormatWithFileAndLine(), Monolog\Handler\DeduplicationHandlerTest\testGcOldLogs(), Monolog\Handler\FilterHandlerTest\testHandleProcessOnlyNeededLevels(), Monolog\Handler\FilterHandlerTest\testIsHandling(), Monolog\Handler\HipChatHandlerTest\testRoomSpaces(), Monolog\Handler\LogEntriesHandlerTest\testWriteContent(), Monolog\Handler\InsightOpsHandlerTest\testWriteContent(), Monolog\Handler\SlackHandlerTest\testWriteContent(), Monolog\Handler\SlackHandlerTest\testWriteContentUsesFormatterIfProvided(), Monolog\Handler\HipChatHandlerTest\testWriteContentV1WithoutName(), Monolog\Handler\HipChatHandlerTest\testWriteContentV2WithoutName(), Monolog\Handler\SlackHandlerTest\testWriteContentWithEmoji(), Monolog\Handler\SlackHandlerTest\testWriteContentWithPlainTextMessage(), Monolog\Handler\HipChatHandlerTest\testWriteCustomHostHeader(), Monolog\Handler\HipChatHandlerTest\testWriteHeader(), Monolog\Handler\PushoverHandlerTest\testWriteHeader(), Monolog\Handler\FlowdockHandlerTest\testWriteHeader(), Monolog\Handler\SlackHandlerTest\testWriteHeader(), Monolog\Handler\HipChatHandlerTest\testWriteTruncatesLongMessage(), Monolog\Handler\HipChatHandlerTest\testWriteV2(), Monolog\Handler\HipChatHandlerTest\testWriteV2Notify(), Monolog\Handler\PushoverHandlerTest\testWriteWithComplexMessage(), Monolog\Handler\HipChatHandlerTest\testWriteWithComplexMessage(), Monolog\Handler\PushoverHandlerTest\testWriteWithComplexTitle(), Monolog\Handler\PushoverHandlerTest\testWriteWithHighPriority(), and Monolog\Handler\PushoverHandlerTest\testWriteWithTooLongMessage().

◆ DEBUG

const Monolog\Logger::DEBUG = 100

Detailed debug information.

Definition at line 33 of file Logger.php.

Referenced by Monolog\Handler\DeduplicationHandler\__construct(), Monolog\Handler\InsightOpsHandlerTest\createHandler(), Monolog\Handler\LogEntriesHandlerTest\createHandler(), Monolog\Handler\FlowdockHandlerTest\createHandler(), Monolog\Handler\RollbarHandlerTest\createHandler(), Monolog\Handler\SlackHandlerTest\createHandler(), Monolog\Handler\HipChatHandlerTest\createHandler(), Monolog\Handler\Slack\SlackRecordTest\dataGetAttachmentColor(), Monolog\Handler\HipChatHandler\getAlertColor(), Monolog\Handler\HipChatHandlerTest\provideBatchRecords(), Monolog\Handler\SlackHandlerTest\provideLevelColors(), Monolog\Handler\HipChatHandlerTest\provideLevelColors(), Monolog\Handler\BrowserConsoleHandlerTest\testAutolabel(), Monolog\Handler\FingersCrossedHandlerTest\testChannelLevelActivationStrategy(), Monolog\Handler\FingersCrossedHandlerTest\testChannelLevelActivationStrategyWithPsrLevels(), Monolog\Handler\FirePHPHandlerTest\testConcurrentHandlers(), Monolog\Handler\ChromePHPHandlerTest\testConcurrentHandlers(), Monolog\Handler\BrowserConsoleHandlerTest\testConcurrentHandlers(), Monolog\Handler\SyslogHandlerTest\testConstruct(), Monolog\Handler\SlackbotHandlerTest\testConstructorFull(), Monolog\Handler\SlackWebhookHandlerTest\testConstructorFull(), Monolog\Handler\FleepHookHandlerTest\testConstructorSetsExpectedDefaults(), Monolog\Handler\BrowserConsoleHandlerTest\testContext(), Monolog\Handler\GelfHandlerTest\testDebug(), Monolog\Handler\GelfHandlerLegacyTest\testDebug(), Monolog\Handler\RavenHandlerTest\testDebug(), Monolog\Handler\FingersCrossedHandlerTest\testErrorLevelActivationStrategy(), Monolog\Handler\FingersCrossedHandlerTest\testErrorLevelActivationStrategyWithPsrLevel(), Monolog\Handler\BrowserConsoleHandlerTest\testEscaping(), Monolog\Handler\RollbarHandlerTest\testExceptionLogLevel(), Monolog\Handler\BufferHandlerTest\testFlush(), Monolog\Handler\DeduplicationHandlerTest\testFlushPassthruIfAllRecordsUnderTrigger(), Monolog\Formatter\FlowdockFormatterTest\testFormatBatch(), Monolog\Formatter\JsonFormatterTest\testFormatBatch(), Monolog\Formatter\JsonFormatterTest\testFormatBatchNewlines(), Monolog\Formatter\ChromePHPFormatterTest\testFormatWithoutContext(), Monolog\Handler\WhatFailureGroupHandlerTest\testHandle(), Monolog\Handler\GroupHandlerTest\testHandle(), Monolog\Handler\WhatFailureGroupHandlerTest\testHandleBatch(), Monolog\Handler\GroupHandlerTest\testHandleBatch(), Monolog\Handler\RavenHandlerTest\testHandleBatchDoNothingIfRecordsAreBelowLevel(), Monolog\Handler\MailHandlerTest\testHandleBatchNotSendsMailIfMessagesAreBelowLevel(), Monolog\Handler\RavenHandlerTest\testHandleBatchPicksProperMessage(), Monolog\Handler\WhatFailureGroupHandlerTest\testHandleBatchUsesProcessors(), Monolog\Handler\GroupHandlerTest\testHandleBatchUsesProcessors(), Monolog\Handler\AbstractProcessingHandlerTest\testHandleBubbling(), Monolog\Handler\BufferHandlerTest\testHandleBufferLimit(), Monolog\Handler\FingersCrossedHandlerTest\testHandleBufferLimit(), Monolog\Handler\BufferHandlerTest\testHandleBufferLimitWithFlushOnOverflow(), Monolog\Handler\BufferHandlerTest\testHandleBuffers(), Monolog\Handler\FingersCrossedHandlerTest\testHandleBuffers(), Monolog\Handler\AbstractProcessingHandlerTest\testHandleIsFalseWhenNotHandled(), Monolog\Handler\BufferHandlerTest\testHandleLevel(), Monolog\Handler\AbstractProcessingHandlerTest\testHandleLowerLevelMessage(), Monolog\Handler\NullHandlerTest\testHandleLowerLevelRecord(), Monolog\Handler\AbstractProcessingHandlerTest\testHandleNotBubbling(), Monolog\Handler\FilterHandlerTest\testHandleProcessOnlyNeededLevels(), Monolog\Handler\FingersCrossedHandlerTest\testHandleResetBufferingAfterBeingTriggeredWhenStopBufferingIsDisabled(), Monolog\Handler\FingersCrossedHandlerTest\testHandleResetBufferingAfterReset(), Monolog\Handler\FleepHookHandlerTest\testHandlerUsesLineFormatterWhichIgnoresEmptyArrays(), Monolog\Handler\AbstractHandlerTest\testHandlesPsrStyleLevels(), Monolog\Handler\FingersCrossedHandlerTest\testHandleStopsBufferingAfterTrigger(), Monolog\Handler\FilterHandlerTest\testHandleUsesProcessors(), Monolog\Handler\FingersCrossedHandlerTest\testHandleWithCallback(), Monolog\Handler\FilterHandlerTest\testHandleWithCallback(), Monolog\Handler\FirePHPHandlerTest\testHeaders(), Monolog\Handler\ChromePHPHandlerTest\testHeaders(), Monolog\Handler\ChromePHPHandlerTest\testHeadersOverflow(), Monolog\Handler\FilterHandlerTest\testIsHandling(), Monolog\Handler\AbstractHandlerTest\testIsHandling(), Monolog\Handler\GroupHandlerTest\testIsHandling(), Monolog\Handler\WhatFailureGroupHandlerTest\testIsHandling(), Monolog\Handler\FingersCrossedHandlerTest\testIsHandlingAlways(), Monolog\Handler\Slack\SlackRecordTest\testMapsLevelToColorAttachmentColor(), Monolog\Handler\SwiftMailerHandlerTest\testMessageCreationIsLazyWhenUsingCallback(), Monolog\Handler\FingersCrossedHandlerTest\testOverrideActivationStrategy(), Monolog\Handler\FingersCrossedHandlerTest\testPassthruOnClose(), Monolog\Handler\RedisHandlerTest\testPredisHandleCapped(), Monolog\Handler\BufferHandlerTest\testPropagatesRecordsAtEndOfRequest(), Monolog\Handler\FingersCrossedHandlerTest\testPsrLevelPassthruOnClose(), Monolog\Handler\RedisHandlerTest\testRedisHandleCapped(), Monolog\Handler\ErrorLogHandlerTest\testShouldLogMessagesUsingErrorLogFuncion(), Monolog\Handler\BrowserConsoleHandlerTest\testStyling(), Monolog\Handler\NewRelicHandlerTest\testTheAppNameCanBeInjectedFromtheConstructor(), Monolog\Handler\NewRelicHandlerTest\testTheAppNameCanBeOverriddenFromEachLog(), Monolog\Handler\NewRelicHandlerTest\testTheTransactionNameCanBeInjectedFromTheConstructor(), Monolog\Handler\NewRelicHandlerTest\testTheTransactionNameCanBeOverriddenFromEachLog(), and Monolog\Handler\StreamHandlerTest\testWriteLocking().

◆ EMERGENCY

◆ ERROR

const Monolog\Logger::ERROR = 400

Runtime errors.

Definition at line 58 of file Logger.php.

Referenced by Monolog\Handler\Slack\SlackRecordTest\dataGetAttachmentColor(), Monolog\Handler\HipChatHandler\getAlertColor(), Monolog\Handler\Slack\SlackRecord\getAttachmentColor(), Monolog\Handler\SlackHandlerTest\provideLevelColors(), Monolog\Handler\HipChatHandlerTest\provideLevelColors(), Monolog\Handler\FilterHandlerTest\testAcceptedLevelApi(), Monolog\Handler\Slack\SlackRecordTest\testAddsLongAttachmentWithContextAndExtra(), Monolog\Handler\Slack\SlackRecordTest\testAddsLongAttachmentWithoutContextAndExtra(), Monolog\Handler\Slack\SlackRecordTest\testAddsShortAttachmentWithContextAndExtra(), Monolog\Handler\Slack\SlackRecordTest\testAddsShortAttachmentWithoutContextAndExtra(), Monolog\Formatter\WildfireFormatterTest\testBatchFormatThrowException(), Monolog\Handler\FingersCrossedHandlerTest\testChannelLevelActivationStrategy(), Monolog\Handler\AbstractHandlerTest\testConstructAndGetSet(), Monolog\Formatter\WildfireFormatterTest\testDefaultFormat(), Monolog\Formatter\ChromePHPFormatterTest\testDefaultFormat(), Monolog\Formatter\GelfMessageFormatterTest\testDefaultFormatter(), Monolog\Formatter\LogstashFormatterTest\testDefaultFormatter(), Monolog\Formatter\LogstashFormatterTest\testDefaultFormatterV1(), Monolog\Handler\RavenHandlerTest\testException(), Monolog\Handler\DeduplicationHandlerTest\testFlushPassthruIfEmptyLog(), Monolog\Handler\DeduplicationHandlerTest\testFlushPassthruIfLogTooOld(), Monolog\Handler\DeduplicationHandlerTest\testFlushSkipsIfLogExists(), Monolog\Formatter\ElasticaFormatterTest\testFormat(), Monolog\Formatter\GelfMessageFormatterTest\testFormatInvalidFails(), Monolog\Formatter\LogstashFormatterTest\testFormatWithApplicationName(), Monolog\Formatter\LogstashFormatterTest\testFormatWithApplicationNameV1(), Monolog\Formatter\LogstashFormatterTest\testFormatWithContext(), Monolog\Formatter\GelfMessageFormatterTest\testFormatWithContext(), Monolog\Formatter\GelfMessageFormatterTest\testFormatWithContextContainingException(), Monolog\Formatter\LogstashFormatterTest\testFormatWithContextV1(), Monolog\Formatter\LogstashFormatterTest\testFormatWithExtra(), Monolog\Formatter\GelfMessageFormatterTest\testFormatWithExtra(), Monolog\Formatter\LogstashFormatterTest\testFormatWithExtraV1(), Monolog\Formatter\WildfireFormatterTest\testFormatWithFileAndLine(), Monolog\Formatter\LogstashFormatterTest\testFormatWithFileAndLine(), Monolog\Formatter\GelfMessageFormatterTest\testFormatWithFileAndLine(), Monolog\Formatter\LogstashFormatterTest\testFormatWithFileAndLineV1(), Monolog\Formatter\GelfMessageFormatterTest\testFormatWithLargeData(), Monolog\Formatter\LogstashFormatterTest\testFormatWithLatin9Data(), Monolog\Formatter\WildfireFormatterTest\testFormatWithoutContext(), Monolog\Formatter\FluentdFormatterTest\testFormatWithTag(), Monolog\Formatter\GelfMessageFormatterTest\testFormatWithUnlimitedLength(), Monolog\Handler\DeduplicationHandlerTest\testGcOldLogs(), Monolog\Handler\ElasticSearchHandlerTest\testHandle(), Monolog\Handler\RavenHandlerTest\testHandleBatchDoNothingIfRecordsAreBelowLevel(), Monolog\Handler\MailHandlerTest\testHandleBatchNotSendsMailIfMessagesAreBelowLevel(), Monolog\Handler\RavenHandlerTest\testHandleBatchPicksProperMessage(), Monolog\Handler\ElasticSearchHandlerTest\testHandleIntegration(), Monolog\Handler\FilterHandlerTest\testHandleProcessOnlyNeededLevels(), Monolog\Handler\FilterHandlerTest\testIsHandling(), Monolog\Handler\GroupHandlerTest\testIsHandling(), Monolog\Handler\WhatFailureGroupHandlerTest\testIsHandling(), Monolog\Handler\FingersCrossedHandlerTest\testIsHandlingAlways(), Monolog\Handler\Slack\SlackRecordTest\testMapsLevelToColorAttachmentColor(), Monolog\Handler\NativeMailerHandlerTest\testMessageSubjectFormatting(), Monolog\Handler\NativeMailerHandlerTest\testSend(), Monolog\Handler\ErrorLogHandlerTest\testShouldLogMessagesUsingErrorLogFuncion(), Monolog\Formatter\WildfireFormatterTest\testTableFormat(), Monolog\Handler\NewRelicHandlerTest\testTheAppNameCanBeInjectedFromtheConstructor(), Monolog\Handler\NewRelicHandlerTest\testTheAppNameCanBeOverriddenFromEachLog(), Monolog\Handler\NewRelicHandlerTest\testTheAppNameIsNullByDefault(), Monolog\Handler\NewRelicHandlerTest\testThehandlerCanAddContextParamsToTheNewRelicTrace(), Monolog\Handler\NewRelicHandlerTest\testThehandlerCanAddExplodedContextParamsToTheNewRelicTrace(), Monolog\Handler\NewRelicHandlerTest\testThehandlerCanAddExplodedExtraParamsToTheNewRelicTrace(), Monolog\Handler\NewRelicHandlerTest\testThehandlerCanAddExtraContextAndParamsToTheNewRelicTrace(), Monolog\Handler\NewRelicHandlerTest\testThehandlerCanAddExtraParamsToTheNewRelicTrace(), Monolog\Handler\NewRelicHandlerTest\testThehandlerCanHandleTheRecord(), Monolog\Handler\NewRelicHandlerTest\testThehandlerCanHandleTheRecordsFormattedUsingTheLineFormatter(), Monolog\Handler\NewRelicHandlerTest\testThehandlerThrowsAnExceptionIfTheNRExtensionIsNotLoaded(), Monolog\Handler\NewRelicHandlerTest\testTheTransactionNameCanBeInjectedFromTheConstructor(), Monolog\Handler\NewRelicHandlerTest\testTheTransactionNameCanBeOverriddenFromEachLog(), and Monolog\Handler\NewRelicHandlerTest\testTheTransactionNameIsNullByDefault().

◆ INFO

const Monolog\Logger::INFO = 200

Interesting events.

Examples: User logs in, SQL logs.

Definition at line 40 of file Logger.php.

Referenced by Monolog\Handler\Slack\SlackRecordTest\dataGetAttachmentColor(), Monolog\Handler\HipChatHandler\getAlertColor(), Monolog\Handler\Slack\SlackRecord\getAttachmentColor(), Monolog\Handler\SlackHandlerTest\provideLevelColors(), Monolog\Handler\HipChatHandlerTest\provideLevelColors(), Monolog\Handler\FilterHandlerTest\testAcceptedLevelApi(), Monolog\Formatter\ChromePHPFormatterTest\testBatchFormatThrowException(), Monolog\Handler\RavenHandlerTest\testExtraParameters(), Monolog\Handler\RavenHandlerTest\testFingerprint(), Monolog\Handler\BufferHandlerTest\testFlush(), Monolog\Handler\DeduplicationHandlerTest\testFlushPassthruIfAllRecordsUnderTrigger(), Monolog\Handler\WhatFailureGroupHandlerTest\testHandle(), Monolog\Handler\GroupHandlerTest\testHandle(), Monolog\Handler\WhatFailureGroupHandlerTest\testHandleBatch(), Monolog\Handler\GroupHandlerTest\testHandleBatch(), Monolog\Handler\RavenHandlerTest\testHandleBatchDoNothingIfRecordsAreBelowLevel(), Monolog\Handler\MailHandlerTest\testHandleBatchNotSendsMailIfMessagesAreBelowLevel(), Monolog\Handler\RavenHandlerTest\testHandleBatchPicksProperMessage(), Monolog\Handler\WhatFailureGroupHandlerTest\testHandleBatchUsesProcessors(), Monolog\Handler\GroupHandlerTest\testHandleBatchUsesProcessors(), Monolog\Handler\BufferHandlerTest\testHandleBufferLimit(), Monolog\Handler\FingersCrossedHandlerTest\testHandleBufferLimit(), Monolog\Handler\BufferHandlerTest\testHandleBufferLimitWithFlushOnOverflow(), Monolog\Handler\BufferHandlerTest\testHandleBuffers(), Monolog\Handler\FingersCrossedHandlerTest\testHandleBuffers(), Monolog\Handler\BufferHandlerTest\testHandleLevel(), Monolog\Handler\FilterHandlerTest\testHandleProcessOnlyNeededLevels(), Monolog\Handler\FingersCrossedHandlerTest\testHandleResetBufferingAfterBeingTriggeredWhenStopBufferingIsDisabled(), Monolog\Handler\FingersCrossedHandlerTest\testHandleResetBufferingAfterReset(), Monolog\Handler\FilterHandlerTest\testHandleRespectsBubble(), Monolog\Handler\FingersCrossedHandlerTest\testHandleUsesProcessors(), Monolog\Handler\FingersCrossedHandlerTest\testHandleWithCallback(), Monolog\Handler\FilterHandlerTest\testHandleWithCallback(), Monolog\Handler\FilterHandlerTest\testIsHandling(), Monolog\Handler\Slack\SlackRecordTest\testMapsLevelToColorAttachmentColor(), Monolog\Handler\SwiftMailerHandlerTest\testMessageCreationIsLazyWhenUsingCallback(), Monolog\Handler\FingersCrossedHandlerTest\testOverrideActivationStrategy(), Monolog\Handler\FingersCrossedHandlerTest\testPassthruOnClose(), Monolog\Handler\FingersCrossedHandlerTest\testPsrLevelPassthruOnClose(), Monolog\Handler\RavenHandlerTest\testRelease(), Monolog\Handler\RavenHandlerTest\testTag(), and Monolog\Handler\RavenHandlerTest\testUserContext().

◆ NOTICE

◆ WARNING

const Monolog\Logger::WARNING = 300

Exceptional occurrences that are not errors.

Examples: Use of deprecated APIs, poor use of an API, undesirable things that are not necessarily wrong.

Definition at line 53 of file Logger.php.

Referenced by Monolog\Handler\FingersCrossedHandler\__construct(), Monolog\Handler\Slack\SlackRecordTest\dataGetAttachmentColor(), Monolog\Handler\HipChatHandler\getAlertColor(), Monolog\Handler\Slack\SlackRecord\getAttachmentColor(), Monolog\Handler\SyslogUdpHandlerTest\getRecordWithMessage(), Monolog\Handler\HipChatHandlerTest\provideBatchRecords(), Monolog\Handler\SlackHandlerTest\provideLevelColors(), Monolog\Handler\HipChatHandlerTest\provideLevelColors(), Monolog\Handler\ChromePHPHandler\send(), Monolog\Handler\Slack\SlackRecordTest\testAddsFallbackAndTextToAttachment(), Monolog\Formatter\ChromePHPFormatterTest\testBatchFormatThrowException(), Monolog\Handler\FingersCrossedHandlerTest\testChannelLevelActivationStrategy(), Monolog\Handler\FingersCrossedHandlerTest\testChannelLevelActivationStrategyWithPsrLevels(), Monolog\Handler\StreamHandlerTest\testClose(), Monolog\Handler\FirePHPHandlerTest\testConcurrentHandlers(), Monolog\Handler\ChromePHPHandlerTest\testConcurrentHandlers(), Monolog\Handler\AbstractHandlerTest\testConstructAndGetSet(), Monolog\Handler\FingersCrossedHandlerTest\testErrorLevelActivationStrategy(), Monolog\Handler\FingersCrossedHandlerTest\testErrorLevelActivationStrategyWithPsrLevel(), Monolog\Handler\Slack\SlackRecordTest\testExcludeExtraAndContextFields(), Monolog\Formatter\FluentdFormatterTest\testFormat(), Monolog\Formatter\FlowdockFormatterTest\testFormatBatch(), Monolog\Formatter\JsonFormatterTest\testFormatBatch(), Monolog\Formatter\JsonFormatterTest\testFormatBatchNewlines(), Monolog\Formatter\MongoDBFormatterTest\testFormatDepthArray(), Monolog\Formatter\MongoDBFormatterTest\testFormatDepthArrayInfiniteNesting(), Monolog\Formatter\MongoDBFormatterTest\testFormatDepthException(), Monolog\Formatter\MongoDBFormatterTest\testFormatDepthObjects(), Monolog\Handler\CouchDBHandlerTest\testHandle(), Monolog\Handler\DoctrineCouchDBHandlerTest\testHandle(), Monolog\Handler\MongoDBHandlerTest\testHandle(), Monolog\Handler\AmqpHandlerTest\testHandleAmqpExt(), Monolog\Handler\RavenHandlerTest\testHandleBatch(), Monolog\Handler\RavenHandlerTest\testHandleBatchPicksProperMessage(), Monolog\Handler\BufferHandlerTest\testHandleBufferLimit(), Monolog\Handler\FingersCrossedHandlerTest\testHandleBufferLimit(), Monolog\Handler\BufferHandlerTest\testHandleBufferLimitWithFlushOnOverflow(), Monolog\Handler\FingersCrossedHandlerTest\testHandleBuffers(), Monolog\Handler\WhatFailureGroupHandlerTest\testHandleException(), Monolog\Handler\AbstractProcessingHandlerTest\testHandleIsFalseWhenNotHandled(), Monolog\Handler\BufferHandlerTest\testHandleLevel(), Monolog\Handler\AbstractProcessingHandlerTest\testHandleLowerLevelMessage(), Monolog\Handler\NullHandlerTest\testHandleLowerLevelRecord(), Monolog\Handler\AmqpHandlerTest\testHandlePhpAmqpLib(), Monolog\Handler\FilterHandlerTest\testHandleProcessOnlyNeededLevels(), Monolog\Handler\FingersCrossedHandlerTest\testHandleResetBufferingAfterBeingTriggeredWhenStopBufferingIsDisabled(), Monolog\Handler\FingersCrossedHandlerTest\testHandleResetBufferingAfterReset(), Monolog\Handler\FilterHandlerTest\testHandleRespectsBubble(), Monolog\Handler\FingersCrossedHandlerTest\testHandleStopsBufferingAfterTrigger(), Monolog\Handler\WhatFailureGroupHandlerTest\testHandleUsesProcessors(), Monolog\Handler\GroupHandlerTest\testHandleUsesProcessors(), Monolog\Handler\FilterHandlerTest\testHandleUsesProcessors(), Monolog\Handler\BufferHandlerTest\testHandleUsesProcessors(), Monolog\Handler\FingersCrossedHandlerTest\testHandleUsesProcessors(), Monolog\Handler\FingersCrossedHandlerTest\testHandleWithBadCallbackThrowsException(), Monolog\Handler\FilterHandlerTest\testHandleWithBadCallbackThrowsException(), Monolog\Handler\FingersCrossedHandlerTest\testHandleWithCallback(), Monolog\Handler\FirePHPHandlerTest\testHeaders(), Monolog\Handler\ChromePHPHandlerTest\testHeaders(), Monolog\Handler\ChromePHPHandlerTest\testHeadersOverflow(), Monolog\Handler\GelfHandlerLegacyTest\testInjectedGelfMessageFormatter(), Monolog\Handler\GelfHandlerTest\testInjectedGelfMessageFormatter(), Monolog\Handler\FilterHandlerTest\testIsHandling(), Monolog\Handler\AbstractHandlerTest\testIsHandling(), Monolog\Handler\WhatFailureGroupHandlerTest\testIsHandling(), Monolog\Handler\GroupHandlerTest\testIsHandling(), Monolog\Handler\Slack\SlackRecordTest\testMapsLevelToColorAttachmentColor(), Monolog\Handler\FingersCrossedHandlerTest\testPassthruOnClose(), Monolog\Handler\RedisHandlerTest\testPredisHandle(), Monolog\Handler\RedisHandlerTest\testPredisHandleCapped(), Monolog\Handler\BufferHandlerTest\testPropagatesRecordsAtEndOfRequest(), Monolog\Handler\FingersCrossedHandlerTest\testPsrLevelPassthruOnClose(), Monolog\Formatter\MongoDBFormatterTest\testRecursiveFormat(), Monolog\Handler\RedisHandlerTest\testRedisHandle(), Monolog\Handler\RedisHandlerTest\testRedisHandleCapped(), Monolog\Formatter\MongoDBFormatterTest\testSimpleFormat(), Monolog\Handler\Slack\SlackRecordTest\testTextEqualsFormatterOutput(), Monolog\Handler\Slack\SlackRecordTest\testTextEqualsMessageIfNoAttachment(), Monolog\Handler\RavenHandlerTest\testWarning(), Monolog\Handler\GelfHandlerLegacyTest\testWarning(), Monolog\Handler\GelfHandlerTest\testWarning(), Monolog\Handler\StreamHandlerTest\testWrite(), and Monolog\Handler\SocketHandlerTest\writeRecord().


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