Req

namespace

bhenk\logger\log

predicates

Cloneable | Instantiable

extends

Log

hierarchy

Req -> Log

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

Log::getType

@inheritdoc

Get the type of logger used by this log agent

return LoggerTypes - type currently in use.

@inheritdoc from method Log::getType

public static function getType(): LoggerTypes

Req::setType

predicates

public | static

implements

Log::setType

@inheritdoc

Set the type of logger used by this log agent

param LoggerTypes $type - the new type.
return LoggerTypes - the old type.

@inheritdoc from method Log::setType

public static function setType(
      Parameter #0 [ <required> bhenk\logger\build\LoggerTypes $type ]
 ): LoggerTypes
param LoggerTypes $type

Req::setLevel

predicates

public | static

inherited from

Log::setLevel

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
param Level | LogLevel | string | int $level - the level to set on the handlers of this log agent.
return void

Req::emergency

predicates

public | static

inherited from

Log::emergency

System is unusable

public static function emergency(
      Parameter #0 [ <required> Stringable|string $message ]
      Parameter #1 [ <optional> array $context = [] ]
 ): void
param Stringable | string $message
param array $context
return void

Req::alert

predicates

public | static

inherited from

Log::alert

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
param Stringable | string $message
param array $context
return void

Req::critical

predicates

public | static

inherited from

Log::critical

Critical conditions

Example: Application component unavailable, unexpected exception.

public static function critical(
      Parameter #0 [ <required> Stringable|string $message ]
      Parameter #1 [ <optional> array $context = [] ]
 ): void
param Stringable | string $message
param array $context
return void

Req::error

predicates

public | static

inherited from

Log::error

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
param Stringable | string $message
param array $context
return void

Req::warning

predicates

public | static

inherited from

Log::warning

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
param Stringable | string $message
param array $context
return void

Req::notice

predicates

public | static

inherited from

Log::notice

Normal but significant events

public static function notice(
      Parameter #0 [ <required> Stringable|string $message ]
      Parameter #1 [ <optional> array $context = [] ]
 ): void
param Stringable | string $message
param array $context
return void

Req::info

predicates

public | static

inherited from

Log::info

Interesting events

Example: User logs in, SQL logs.

public static function info(
      Parameter #0 [ <required> Stringable|string $message ]
      Parameter #1 [ <optional> array $context = [] ]
 ): void
param Stringable | string $message
param array $context
return void

Req::debug

predicates

public | static

inherited from

Log::debug

Detailed debug information

public static function debug(
      Parameter #0 [ <required> Stringable|string $message ]
      Parameter #1 [ <optional> array $context = [] ]
 ): void
param Stringable | string $message
param array $context
return void

Req::log

predicates

public | static

inherited from

Log::log

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
param Level | string | int $level
param Stringable | string $message
param array $context
return void

Sat, 29 Apr 2023 12:38:18 +0000