PHP Fatal error

Created on 4 April 2024, 3 months ago

Problem/Motivation

PHP Fatal error: Declaration of Drupal\monolog_loki\Logger\Formatter\LokiFormatter::format(array $record): array must be compatible with Itspire\MonologLoki\Formatter\LokiFormatter::format(Monolog\LogRecord $record): array in /app/web/modules/custom/monolog_loki/src/Logger/Formatter/LokiFormatter.php on line 54

Steps to reproduce

Running under Drupal 10.

Proposed resolution

At https://git.drupalcode.org/project/monolog_loki/-/blob/1.x/src/Logger/Fo..., need to change LokiFormatter format(array $record) to LogRecord $record and import the class use Monolog\LogRecord;

🐛 Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

🇳🇿New Zealand jonathan_hunt

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024