mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
1b8d295767
API CHANGE: Debug::showError(), Debug::showLines(), Debug::log(), and Debug::header() removed NEW: Logging provided ZendLog has been removed and monolog introduced instead as a dependency. The “ErrorLogger” injection point is now the used as the logger that errors are fed into, and implements PSR-3’s Psr\Log\LoggerInterface. The SS_ERROR_LOG setting expect a Monolog Logger to be provided as the ErrorLogger.
46 lines
1.0 KiB
YAML
46 lines
1.0 KiB
YAML
---
|
|
Name: logging
|
|
---
|
|
Injector:
|
|
ErrorHandler:
|
|
class: SilverStripe\Framework\Logging\MonologErrorHandler
|
|
properties:
|
|
Logger: %$Logger
|
|
Logger:
|
|
type: singleton
|
|
class: Monolog\Logger
|
|
constructor:
|
|
- "error-log"
|
|
calls:
|
|
DisplayErrorHandler: [ pushHandler, [ %$DisplayErrorHandler ] ]
|
|
|
|
---
|
|
Name: dev-logging
|
|
Only:
|
|
environment: dev
|
|
---
|
|
Injector:
|
|
DisplayErrorHandler:
|
|
class: SilverStripe\Framework\Logging\HTTPOutputHandler
|
|
constructor:
|
|
- "notice"
|
|
properties:
|
|
Formatter: %$SilverStripe\Framework\Logging\DetailedErrorFormatter
|
|
---
|
|
Name: live-logging
|
|
Except:
|
|
environment: dev
|
|
---
|
|
Injector:
|
|
DisplayErrorHandler:
|
|
class: SilverStripe\Framework\Logging\HTTPOutputHandler
|
|
constructor:
|
|
- "error"
|
|
properties:
|
|
Formatter: %$FriendlyErrorFormatter
|
|
FriendlyErrorFormatter:
|
|
class: SilverStripe\Framework\Logging\DebugViewFriendlyErrorFormatter
|
|
properties:
|
|
Title: "There has been an error"
|
|
Body: "The website server has not been able to respond to your request"
|