Compatibility with 'Itspire - Monolog Loki' ^2.0

Created on 4 April 2024, 9 months ago
Updated 4 September 2024, 4 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 work

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024