-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from consilience/feature/issue3
Issue #3 move processor definitions to config file.
- Loading branch information
Showing
4 changed files
with
65 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,35 @@ | ||
<?php | ||
|
||
use Consilience\Laravel\ExtendedLogging\Processor\AppNameProcessor; | ||
use Consilience\Laravel\ExtendedLogging\Processor\AuthUserProcessor; | ||
use Consilience\Laravel\ExtendedLogging\Processor\JobNameProcessor; | ||
use Consilience\Laravel\ExtendedLogging\Tap; | ||
use Monolog\Processor\MemoryUsageProcessor; | ||
use Monolog\Processor\ProcessIdProcessor; | ||
use Monolog\Processor\PsrLogMessageProcessor; | ||
use Monolog\Processor\UidProcessor; | ||
|
||
return [ | ||
// Set to "pretty print" JSON output for easier reading during development. | ||
|
||
'json-pretty-print' => false, | ||
|
||
// Processors of Monolog\Processor\ProcessorInterface to use for each log. | ||
// This package provides a few, monolog provides a bunch | ||
// built in, and you can add your own. | ||
|
||
'processors' => [ | ||
// Custom processors. | ||
|
||
new AuthUserProcessor(), | ||
new AppNameProcessor(), | ||
new JobNameProcessor(), | ||
|
||
// Standard monolog processors. | ||
|
||
new UidProcessor(Tap::UID_LENGTH), | ||
new PsrLogMessageProcessor, | ||
new ProcessIdProcessor, | ||
new MemoryUsageProcessor, | ||
], | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters