silverstripe-framework/_config/logging.yml
Sam Minnee 1b8d295767 API CHANGE: Shift to Monolog for error reporting and logging
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.
2015-08-28 16:06:41 +12:00

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"