Page 1 of 1

Application logging

Posted: Sat Aug 02, 2008 10:06 pm
by ngungo
I would like to direct all application errors to a log file, /home/mysite.com/logs/myapp_log and prevent them display to the standard output (screen) so I do this:

Code: Select all

 
error_reporting(E_ALL | E_STRICT);
ini_set("display_errors", "Off");
ini_set("log_errors", "On");
ini_set("error_log", "/home/mysite.com/logs/myapp_log");
 
It still displays to the standard out and not to the file. Did I do it wrongly?

Thanks,
ngungo

Re: Application logging

Posted: Sun Aug 03, 2008 10:13 am
by pkbruker
Try replacing the first line with:

Code: Select all

 
error_reporting(0);