On linux in shell programming I use to being able to use the logger command to write the system log. Is there the equivalent function to do this from PHP? Or is it common practice to use exec("logger...") to do this?
It's easy to fill a system log with errors when you break code - been there, done that. :)
However you can either make your own logging system, or maybe have a look here: http://php.net/manual/en/function.syslog.php