silverstripe-framework/_config/logging.yml
Damian Mooyman ce14060913 API Apply default logger to all caches
API Rename ‘Logger’ service name to ‘Psr\Log\LoggerInterface’
API DefaultCacheFactory constructor now takes an array of default arguments
2017-03-15 15:31:24 +13:00

46 lines
1.1 KiB
YAML

---
Name: logging
---
SilverStripe\Core\Injector\Injector:
ErrorHandler:
class: SilverStripe\Logging\MonologErrorHandler
properties:
Logger: %$Psr\Log\LoggerInterface
Psr\Log\LoggerInterface:
type: singleton
class: Monolog\Logger
constructor:
- "error-log"
calls:
DisplayErrorHandler: [ pushHandler, [ %$DisplayErrorHandler ] ]
---
Name: dev-logging
Only:
environment: dev
---
SilverStripe\Core\Injector\Injector:
DisplayErrorHandler:
class: SilverStripe\Logging\HTTPOutputHandler
constructor:
- "notice"
properties:
Formatter: %$SilverStripe\Logging\DetailedErrorFormatter
---
Name: live-logging
Except:
environment: dev
---
SilverStripe\Core\Injector\Injector:
DisplayErrorHandler:
class: SilverStripe\Logging\HTTPOutputHandler
constructor:
- "error"
properties:
Formatter: %$FriendlyErrorFormatter
FriendlyErrorFormatter:
class: SilverStripe\Logging\DebugViewFriendlyErrorFormatter
properties:
Title: "There has been an error"
Body: "The website server has not been able to respond to your request"