From 6c6d2172737517a634f1740aa0167f6a8f798d32 Mon Sep 17 00:00:00 2001 From: Antony Thorpe Date: Wed, 3 Dec 2014 16:56:53 +1300 Subject: [PATCH] Update error-handling.md Add how to log notices (deprecation notifications can help with discovering problems caused by old code). --- docs/en/topics/error-handling.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/en/topics/error-handling.md b/docs/en/topics/error-handling.md index c40650521..88ab7c975 100644 --- a/docs/en/topics/error-handling.md +++ b/docs/en/topics/error-handling.md @@ -58,9 +58,11 @@ added. :::php // log errors and warnings - SS_Log::add_writer(new SS_LogFileWriter('/my/logfile/path'), SS_Log::WARN, '<='); + SS_Log::add_writer(new SS_LogFileWriter('../silverstripe-errors-warnings.log'), SS_Log::WARN, '<='); // or just errors - SS_Log::add_writer(new SS_LogFileWriter('/my/logfile/path'), SS_Log::ERR); + SS_Log::add_writer(new SS_LogFileWriter('../silverstripe-errors.log'), SS_Log::ERR); + // or notices (e.g. for Deprecation Notifications) + SS_Log::add_writer(new SS_LogFileWriter('../silverstripe-errors-notices.log'), SS_Log::NOTICE); ### From PHP @@ -84,4 +86,4 @@ You can send both fatal errors and warnings in your code to a specified email-ad // log errors and warnings SS_Log::add_writer(new SS_LogEmailWriter('admin@domain.com'), SS_Log::WARN, '<='); // or just errors - SS_Log::add_writer(new SS_LogEmailWriter('admin@domain.com'), SS_Log::ERR); \ No newline at end of file + SS_Log::add_writer(new SS_LogEmailWriter('admin@domain.com'), SS_Log::ERR);