This is a simple Logger trait that classes unable to extend AbstractLogger (because they extend another class, etc) can include.
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.
Methods | ||
---|---|---|
public
|
emergency(string|Stringable $message, array $context = []): void
|
# |
public
|
alert(string|Stringable $message, array $context = []): void
|
# |
public
|
critical(string|Stringable $message, array $context = []): void
|
# |
public
|
error(string|Stringable $message, array $context = []): void
|
# |
public
|
warning(string|Stringable $message, array $context = []): void
|
# |
public
|
notice(string|Stringable $message, array $context = []): void
|
# |
public
|
info(string|Stringable $message, array $context = []): void
|
# |
public
|
debug(string|Stringable $message, array $context = []): void
|
# |
abstract
public
|
log(mixed $level, string|Stringable $message, array $context = []): void
|
# |