surda / monolog-nette-user-processor
Adds extra data about the current user to the log message.
v1.0.0
2017-08-11 08:46 UTC
Requires
- php: >=5.6
- nette/security: ~2.3
Requires (Dev)
- nette/tester: ~1.6
This package is not auto-updated.
Last update: 2025-01-05 05:43:31 UTC
README
Adds extra data about the current user to the Monolog log message.
Installation
Via Composer
$ composer require surda/monolog-nette-user-processor
and add to config.neon
monolog: processors: - Surda\Monolog\Processor\NetteUserProcessor
Usage
$this->logger->addError('Error message.');
Message in log
[2016-12-31 23:59:59] app.ERROR: Error message. [] {"nette-user":{"id":10,"loggedIn":true}}