Logs
The Logs method allows all information that is neither an error, not an activity to be logged.
The Streply\Log
method consists of 2 parameters:
PHP
function Log(string $message, array $params = []): ?Streply\Responses\Entity;
The Streply\Log
method allows all information that is neither an error nor an activity to be logged.
(string) $message
- Name of the activity(array) $params
- Parameters
Example:
PHP
Streply\Log('users export failure');
For example, a failure message can be added as a parameter:
PHP
Streply\Log('users export failure', [
'message' => $message
]);
Send backtrace in logs
To improve performance, Streply only sends backtraces for errors by default. If you also want backtraces in logs, you need to enable the "backTraceInLogs" option.
Streply\Configuration::backTraceInLogs();
Logs formatting
See how to format logs.