Req
namespace |
bhenk\logger\log |
predicates |
Cloneable | Instantiable |
extends |
|
hierarchy |
A log agent for recording request parameters
The type of Logger used by this log agent defaults to “req”.
Documentation of logging calls copied from https://www.php-fig.org/psr/psr-3/.
Methods
Req::getType
predicates |
public | static |
implements |
@inheritdoc
Get the type of logger used by this log agent
@inheritdoc from method Log::getType
public static function getType(): LoggerTypes
Req::setType
predicates |
public | static |
implements |
@inheritdoc
Set the type of logger used by this log agent
@inheritdoc from method Log::setType
public static function setType(
Parameter #0 [ <required> bhenk\logger\build\LoggerTypes $type ]
): LoggerTypes
Req::setLevel
predicates |
public | static |
inherited from |
Set the level at which the handlers of this log agents logger will fire
Warning: do not use this method for logging configuration. Use a logger definition file instead.
Caveat: this method will only have effect on implementations of logger that expose the method getHandlers() and only on handlers that expose the method setLevel().
public static function setLevel(
Parameter #0 [ <required> Monolog\Level|Psr\Log\LogLevel|string|int $level ]
): void
Req::emergency
predicates |
public | static |
inherited from |
System is unusable
public static function emergency(
Parameter #0 [ <required> Stringable|string $message ]
Parameter #1 [ <optional> array $context = [] ]
): void
Req::alert
predicates |
public | static |
inherited from |
Action must be taken immediately
Example: Entire website down, database unavailable, etc. This should trigger the SMS alerts and wake you up.
public static function alert(
Parameter #0 [ <required> Stringable|string $message ]
Parameter #1 [ <optional> array $context = [] ]
): void
Req::critical
predicates |
public | static |
inherited from |
Critical conditions
Example: Application component unavailable, unexpected exception.
public static function critical(
Parameter #0 [ <required> Stringable|string $message ]
Parameter #1 [ <optional> array $context = [] ]
): void
Req::error
predicates |
public | static |
inherited from |
Runtime errors that do not require immediate action but should typically be logged and monitored
public static function error(
Parameter #0 [ <required> Stringable|string $message ]
Parameter #1 [ <optional> array $context = [] ]
): void
Req::warning
predicates |
public | static |
inherited from |
Exceptional occurrences that are not errors
Example: Use of deprecated APIs, poor use of an API, undesirable things that are not necessarily wrong.
public static function warning(
Parameter #0 [ <required> Stringable|string $message ]
Parameter #1 [ <optional> array $context = [] ]
): void
Req::notice
predicates |
public | static |
inherited from |
Normal but significant events
public static function notice(
Parameter #0 [ <required> Stringable|string $message ]
Parameter #1 [ <optional> array $context = [] ]
): void
Req::info
predicates |
public | static |
inherited from |
Interesting events
Example: User logs in, SQL logs.
public static function info(
Parameter #0 [ <required> Stringable|string $message ]
Parameter #1 [ <optional> array $context = [] ]
): void
Req::debug
predicates |
public | static |
inherited from |
Detailed debug information
public static function debug(
Parameter #0 [ <required> Stringable|string $message ]
Parameter #1 [ <optional> array $context = [] ]
): void
Req::log
predicates |
public | static |
inherited from |
Logs with an arbitrary level
public static function log(
Parameter #0 [ <required> Monolog\Level|string|int $level ]
Parameter #1 [ <required> Stringable|string $message ]
Parameter #2 [ <optional> array $context = [] ]
): void
Sat, 29 Apr 2023 12:38:18 +0000