Skip to content

Commit ad05319

Browse files
author
Daniel Mellum
committed
update readme for processors.
1 parent 3595784 commit ad05319

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

readme.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,19 @@ LogToDB::model()->removeOlderThan('2019-01-01 23:00:00');
324324

325325
## Processors
326326
Monolog ships with a set of [processors](https://github.com/Seldaek/monolog/tree/master/src/Monolog/Processor), these will generate additional data and populate the 'extra' field.
327+
I've also added a couple of example processors in this pacage under src/Processors.
328+
To enable processors you can add them to the log config array:
329+
```php
330+
'database' => [
331+
'driver' => 'custom',
332+
'via' => danielme85\LaravelLogToDB\LogToDbHandler::class
333+
...
334+
'processors' => [
335+
\danielme85\LaravelLogToDB\Processors\PhpVersionProcessor::class,
336+
Monolog\Processor\HostnameProcessor::class,
337+
]
338+
339+
```
327340

328341
You could also create your own custom processor, make sure they implement [Monolog\Processor\ProcessorInterface](https://github.com/Seldaek/monolog/blob/master/src/Monolog/Processor/ProcessorInterface.php).
329342

0 commit comments

Comments
 (0)