Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Installing SilverStripe /

Getting SilverStripe up and running on your computer and on your web server.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

ScriptAlias


Reply


9 Posts   3074 Views

Avatar
timwjohn

Community Member, 98 Posts

20 March 2010 at 11:20am

Edited: 20/03/2010 11:57am

For anyone too lazy to search for ss_log.php (which is actually log.php) to read the class notes before searching the forums like me, the now depreciated code

Debug::log_errors_to("/my/logfile/path");

can be replaced with

SS_Log::add_writer(new SS_LogFileWriter(Director::baseFolder() . '/error_log.txt'), SS_Log::ERR);
SS_Log::add_writer(new SS_LogFileWriter(Director::baseFolder() . '/error_log.txt'), SS_Log::NOTICE);
SS_Log::add_writer(new SS_LogFileWriter(Director::baseFolder() . '/error_log.txt'), SS_Log::WARN);

Saves you a couple of minutes.