Merge pull request #6824 from micmania1/patch-13

DOCS Corrected logger documentation
This commit is contained in:
Chris Joe 2017-04-21 15:18:22 +12:00 committed by GitHub
commit 430c7ad79a

View File

@ -95,7 +95,7 @@ for you to try.
To send emails, you can use Monolog's [NativeMailerHandler](https://github.com/Seldaek/monolog/blob/master/src/Monolog/Handler/NativeMailerHandler.php#L74), like this: To send emails, you can use Monolog's [NativeMailerHandler](https://github.com/Seldaek/monolog/blob/master/src/Monolog/Handler/NativeMailerHandler.php#L74), like this:
SilverStripe\Core\Injector\Injector: SilverStripe\Core\Injector\Injector:
Logger: Psr\Log\LoggerInterface:
calls: calls:
MailHandler: [ pushHandler, [ %$MailHandler ] ] MailHandler: [ pushHandler, [ %$MailHandler ] ]
MailHandler: MailHandler:
@ -120,7 +120,7 @@ The calls key, `MailHandler`, can be anything you like: its main purpose is to l
To log to a file, you can use Monolog's [StreamHandler](https://github.com/Seldaek/monolog/blob/master/src/Monolog/Handler/StreamHandler.php#L74), like this: To log to a file, you can use Monolog's [StreamHandler](https://github.com/Seldaek/monolog/blob/master/src/Monolog/Handler/StreamHandler.php#L74), like this:
SilverStripe\Core\Injector\Injector: SilverStripe\Core\Injector\Injector:
Logger: Psr\Log\LoggerInterface:
calls: calls:
LogFileHandler: [ pushHandler, [ %$LogFileHandler ] ] LogFileHandler: [ pushHandler, [ %$LogFileHandler ] ]
LogFileHandler: LogFileHandler:
@ -137,7 +137,7 @@ You can disable a handler by removing its pushHandlers call from the calls optio
The handler key of the default handler is `DisplayErrorHandler`, so you can disable it like this: The handler key of the default handler is `DisplayErrorHandler`, so you can disable it like this:
SilverStripe\Core\Injector\Injector: SilverStripe\Core\Injector\Injector:
Logger: Psr\Log\LoggerInterface:
calls: calls:
DisplayErrorHandler: %%remove%% DisplayErrorHandler: %%remove%%
@ -153,7 +153,7 @@ non-dev.
environment: dev environment: dev
--- ---
SilverStripe\Core\Injector\Injector: SilverStripe\Core\Injector\Injector:
Logger: Psr\Log\LoggerInterface:
calls: calls:
- [ pushHandler, [ %$DisplayErrorHandler ]] - [ pushHandler, [ %$DisplayErrorHandler ]]
DisplayErrorHandler: DisplayErrorHandler:
@ -168,7 +168,7 @@ non-dev.
environment: dev environment: dev
--- ---
SilverStripe\Core\Injector\Injector: SilverStripe\Core\Injector\Injector:
Logger: Psr\Log\LoggerInterface:
calls: calls:
- [ pushHandler, [ %$LogFileHandler ]] - [ pushHandler, [ %$LogFileHandler ]]
- [ pushHandler, [ %$DisplayErrorHandler ]] - [ pushHandler, [ %$DisplayErrorHandler ]]