Moodle PHP Documentation 5.1
Moodle 5.1dev (Build: 20250620) (7d9030acd6e)
Psr\Log\LoggerInterface Interface Reference
Inheritance diagram for Psr\Log\LoggerInterface:
Psr\Log\AbstractLogger Psr\Log\NullLogger Slim\Logger

Public Member Functions

 alert (string|Stringable $message, array $context=[])
 Action must be taken immediately.
 
 critical (string|Stringable $message, array $context=[])
 Critical conditions.
 
 debug (string|Stringable $message, array $context=[])
 Detailed debug information.
 
 emergency (string|Stringable $message, array $context=[])
 System is unusable.
 
 error (string|Stringable $message, array $context=[])
 Runtime errors that do not require immediate action but should typically be logged and monitored.
 
 info (string|Stringable $message, array $context=[])
 Interesting events.
 
 log ($level, string|Stringable $message, array $context=[])
 Logs with an arbitrary level.
 
 notice (string|Stringable $message, array $context=[])
 Normal but significant events.
 
 warning (string|Stringable $message, array $context=[])
 Exceptional occurrences that are not errors.
 

Member Function Documentation

◆ alert()

Psr\Log\LoggerInterface::alert ( string|Stringable $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.

Parameters
mixed[]$context

◆ critical()

Psr\Log\LoggerInterface::critical ( string|Stringable $message,
array $context = [] )

Critical conditions.

Example: Application component unavailable, unexpected exception.

Parameters
mixed[]$context

◆ debug()

Psr\Log\LoggerInterface::debug ( string|Stringable $message,
array $context = [] )

Detailed debug information.

Parameters
mixed[]$context

◆ emergency()

Psr\Log\LoggerInterface::emergency ( string|Stringable $message,
array $context = [] )

System is unusable.

Parameters
mixed[]$context

◆ error()

Psr\Log\LoggerInterface::error ( string|Stringable $message,
array $context = [] )

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

Parameters
mixed[]$context

◆ info()

Psr\Log\LoggerInterface::info ( string|Stringable $message,
array $context = [] )

Interesting events.

Example: User logs in, SQL logs.

Parameters
mixed[]$context

◆ log()

Psr\Log\LoggerInterface::log ( $level,
string|Stringable $message,
array $context = [] )

Logs with an arbitrary level.

Parameters
mixed$level
mixed[]$context
Exceptions
Psr\Log\InvalidArgumentException

Implemented in Psr\Log\NullLogger.

◆ notice()

Psr\Log\LoggerInterface::notice ( string|Stringable $message,
array $context = [] )

Normal but significant events.

Parameters
mixed[]$context

◆ warning()

Psr\Log\LoggerInterface::warning ( string|Stringable $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.

Parameters
mixed[]$context

The documentation for this interface was generated from the following file: