silverstripe-webpack/app/_config/base-logs.yml_

65 lines
1.9 KiB
Plaintext
Raw Normal View History

2020-12-28 05:13:27 +01:00
---
Name: webapp-base-logs-dev
2021-06-19 22:22:44 +02:00
After:
- a2nt-cms-niceties-base-logs-dev
2020-12-28 05:13:27 +01:00
Only:
environment: dev
---
SilverStripe\Core\Injector\Injector:
Psr\Log\LoggerInterface.errorhandler:
calls:
pushMyDisplayErrorHandler: [pushHandler, ['%$DisplayErrorHandler']]
DisplayErrorHandler:
class: SilverStripe\Logging\HTTPOutputHandler
constructor:
- 'notice'
properties:
Formatter: '%$SilverStripe\Logging\DetailedErrorFormatter'
CLIFormatter: '%$SilverStripe\Logging\DetailedErrorFormatter'
---
Name: webapp-base-logs-live
2021-06-19 22:22:44 +02:00
After:
- a2nt-cms-niceties-base-logs-live
2020-12-28 05:13:27 +01:00
Except:
environment: dev
---
SilverStripe\Core\Injector\Injector:
# Default logger implementation for general purpose use
Psr\Log\LoggerInterface:
calls:
# Save system logs to file
pushFileLogHandler: [pushHandler, ['%$LogFileHandler']]
# Core error handler for system use
Psr\Log\LoggerInterface.errorhandler:
calls:
# Save errors to file
pushFileLogHandler: [pushHandler, ['%$LogFileHandler']]
# Format and display errors in the browser/CLI
pushMyDisplayErrorHandler: [pushHandler, ['%$DisplayErrorHandler']]
# Custom handler to log to a file
LogFileHandler:
class: Monolog\Handler\StreamHandler
constructor:
- '../silverstripe.log'
- 'notice'
properties:
Formatter: '%$Monolog\Formatter\HtmlFormatter'
ContentType: text/html
# Handler for displaying errors in the browser or CLI
DisplayErrorHandler:
class: SilverStripe\Logging\HTTPOutputHandler
constructor:
- 'error'
properties:
Formatter: '%$SilverStripe\Logging\DebugViewFriendlyErrorFormatter'
# Configuration for the "friendly" error formatter
SilverStripe\Logging\DebugViewFriendlyErrorFormatter:
class: SilverStripe\Logging\DebugViewFriendlyErrorFormatter
properties:
Title: 'There has been an error'
Body: 'The website server has not been able to respond to your request'