Logger
in package
Tags
Table of Contents
Properties
- $instance : mixed
Methods
- debug() : void
- NB: unlike other "traditional" loggers, this one echoes to screen the debug messages instead of logging them.
- error() : void
- Triggers the writing of a message to php's error log
- instance() : Logger
- This class can be used as singleton, so that later we can move to DI patterns (ish...)
- warning() : void
- Following the general principle of 'never break stdout', the default behaviour
Properties
$instance
protected
static mixed
$instance
= null
Methods
debug()
NB: unlike other "traditional" loggers, this one echoes to screen the debug messages instead of logging them.
public
debug(string $message[, array<string|int, mixed> $context = array() ]) : void
Parameters
- $message : string
- $context : array<string|int, mixed> = array()
-
known key: 'encoding'
error()
Triggers the writing of a message to php's error log
public
error(string $message[, array<string|int, mixed> $context = array() ]) : void
Parameters
- $message : string
- $context : array<string|int, mixed> = array()
instance()
This class can be used as singleton, so that later we can move to DI patterns (ish...)
public
static instance() : Logger
Return values
Loggerwarning()
Following the general principle of 'never break stdout', the default behaviour
public
warning(string $message[, mixed $context = array() ]) : void
Parameters
- $message : string
- $context : mixed = array()