Commit 80315247 authored by Damian Mooyman's avatar Damian Mooyman

Merge branch 'better-logs' into 'master'

Push all logs to syslog, to ensure exceptions are captured.

Requires https://github.com/silverstripe/silverstripe-auditor/pull/7

Here is some example logs:
```
Aug 25 09:50:20 rabarbar.local SilverStripe_log[80610]: ERROR: talk to me! (line 143 in /Users/muzdowski/Sites/cwp-installer/framework/control/Controller.php) ["extra!"]
Aug 25 09:50:38 rabarbar.local SilverStripe_log[80612]: ERROR: Uncaught Exception: e (line 552 in /Users/muzdowski/Sites/cwp-installer/cwp/code/pagetypes/BasePage.php) []
Aug 25 09:50:56 rabarbar.local SilverStripe_log[80613]: WARNING: mysqli::mysqli(): MySQL server has gone away (line 77 in /Users/muzdowski/Sites/cwp-installer/framework/model/connect/MySQLiConnector.php) []
```

See merge request !45
parents 3439678c 8c075dd4
......@@ -8,6 +8,9 @@
## NOTE: Put your custom site configuration into mysite/_config/config.yml
## and if absolutely necessary if you can't use the yml file, mysite/_config.php instead.
// Tee logs to syslog to make sure we capture everything regardless of project-specific SS_Log configuration.
SS_Log::add_writer(new \SilverStripe\Auditor\MonologSysLogWriter(), SS_Log::DEBUG, '<=');
// configure document converter.
if (class_exists('DocumentConverterDecorator') && defined('DOCVERT_USERNAME')) {
DocumentImportIFrameField_Importer::set_docvert_username(DOCVERT_USERNAME);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment