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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Installing SilverStripe /

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

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

ScriptAlias


Go to End


9 Posts   4511 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.

Go to Top