ILogger
in
Interface for logging operations, compliant with PSR-3 log levels.
This interface defines the contract that all concrete logger implementations (e.g., CFileLogger, CMonologLogger) must adhere to.
Table of Contents
Methods
- AddLog() : void
- Logs a request and its corresponding response with a custom format.
- Alert() : void
- Action must be taken immediately.
- Critical() : void
- Critical conditions.
- Debug() : void
- Detailed debug information.
- Emergency() : void
- System is unusable.
- Error() : void
- Runtime errors that do not require immediate action but should typically be logged and monitored.
- Info() : void
- Interesting events.
- Notice() : void
- Normal but significant events.
- Warning() : void
- Exceptional occurrences that are not errors.
Methods
AddLog()
Logs a request and its corresponding response with a custom format.
public
AddLog(CUser $user, CRequest|null $request, CResponse|null $response) : void
Parameters
Alert()
Action must be taken immediately.
public
Alert(string $message[, array<string|int, mixed> $context = [] ]) : void
Parameters
- $message : string
-
The log message.
- $context : array<string|int, mixed> = []
-
The log context.
Critical()
Critical conditions.
public
Critical(string $message[, array<string|int, mixed> $context = [] ]) : void
Parameters
- $message : string
-
The log message.
- $context : array<string|int, mixed> = []
-
The log context.
Debug()
Detailed debug information.
public
Debug(string $message[, array<string|int, mixed> $context = [] ]) : void
Parameters
- $message : string
-
The log message.
- $context : array<string|int, mixed> = []
-
The log context.
Emergency()
System is unusable.
public
Emergency(string $message[, array<string|int, mixed> $context = [] ]) : void
Parameters
- $message : string
-
The log message.
- $context : array<string|int, mixed> = []
-
The log context.
Error()
Runtime errors that do not require immediate action but should typically be logged and monitored.
public
Error(string $message[, array<string|int, mixed> $context = [] ]) : void
Parameters
- $message : string
-
The log message.
- $context : array<string|int, mixed> = []
-
The log context.
Info()
Interesting events.
public
Info(string $message[, array<string|int, mixed> $context = [] ]) : void
Parameters
- $message : string
-
The log message.
- $context : array<string|int, mixed> = []
-
The log context.
Notice()
Normal but significant events.
public
Notice(string $message[, array<string|int, mixed> $context = [] ]) : void
Parameters
- $message : string
-
The log message.
- $context : array<string|int, mixed> = []
-
The log context.
Warning()
Exceptional occurrences that are not errors.
public
Warning(string $message[, array<string|int, mixed> $context = [] ]) : void
Parameters
- $message : string
-
The log message.
- $context : array<string|int, mixed> = []
-
The log context.