griffolion / psr-dot-notation-processor
Allows dot notation when using curly bracket interpolation in Monolog log messages.
Installs: 4
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/griffolion/psr-dot-notation-processor
Requires
- php: >=7.2
- monolog/monolog: ^2 <3
Requires (Dev)
- ext-json: *
- phpunit/phpunit: ^8.5.14
This package is auto-updated.
Last update: 2025-09-22 08:41:26 UTC
README
Introduction
This package allows the use of array dot notation when using PSR-3 log message interpolation within Monolog. When using PsrLogMessageProcessor
that ships as standard with Monolog, only the first level of $record['context']
is parsed into the template. This processor allows you to access deeper levels of the context
array to enrich your log messages with meaningful data that may be buried.
Example:
$logger->info('Call time took {call_stats.transfer_time}ms.', ['call_stats' => ['transfer_time' => 587]]);
Will translate to:
Call time took 587ms.
Requirements
- Monolog 2
Installation
composer require griffolion/psr-dot-notation-processor