This Logger can be used to avoid conditional log calls.

Logging should always be optional, and if no logger is provided to your
library creating a NullLogger instance to have something to throw logs at
is a good way to avoid littering your code with if ($this->logger) { }

public Psr\Log\AbstractLogger::alert( $message, array $context = [])
Action must be taken immediately.

Example: Entire website down, database unavailable, etc. This should
trigger the SMS alerts and wake you up.

  • return void
public Psr\Log\AbstractLogger::critical( $message, array $context = [])
Critical conditions.

Example: Application component unavailable, unexpected exception.

  • return void
public Psr\Log\AbstractLogger::debug( $message, array $context = [])
Detailed debug information.

  • return void
public Psr\Log\AbstractLogger::emergency( $message, array $context = [])
System is unusable.

  • return void
public Psr\Log\AbstractLogger::error( $message, array $context = [])
Runtime errors that do not require immediate action but should typically be logged and monitored.

  • return void
public Psr\Log\AbstractLogger::info( $message, array $context = [])
Interesting events.

Example: User logs in, SQL logs.

  • return void
public log( $level, $message, array $context = [])
Logs with an arbitrary level.

public Psr\Log\AbstractLogger::notice( $message, array $context = [])
Normal but significant events.

  • return void
public Psr\Log\AbstractLogger::warning( $message, array $context = [])
Exceptional occurrences that are not errors.

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

  • return void
© 2020 Bruce Wells
Search Namespaces \ Classes
ConfigurationNumbers (0-9.) only