Copied!

This is a simple Logger implementation that other Loggers can inherit from.

It simply delegates all log-level-specific methods to the log method to
reduce boilerplate code that a simple Logger that does the same thing with
messages regardless of the error level has to implement.

Abstract
Methods
public 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 critical ( $message , array $context = [ ] )
 

Critical conditions.

Example: Application component unavailable, unexpected exception.

  • return void
public debug ( $message , array $context = [ ] )
 

Detailed debug information.

  • return void
public emergency ( $message , array $context = [ ] )
 

System is unusable.

  • return void
public error ( $message , array $context = [ ] )
 

Runtime errors that do not require immediate action but should typically
be logged and monitored.

  • return void
public info ( $message , array $context = [ ] )
 

Interesting events.

Example: User logs in, SQL logs.

  • return void
public abstract Psr\Log\LoggerInterface :: log ( $level , $message , array $context = [ ] )
 

Logs with an arbitrary level.

public notice ( $message , array $context = [ ] )
 

Normal but significant events.

  • return void
public 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
Configuration Numbers (0-9.) only