Custom error handler for PHP
Look here it is already tested on live projects error catcher.
Fatal errors can be catch only by 'register_shutdown_function'
You do not track uncatched Exceptions, it can be done by 'set_exception_handler'
If code runout all memory it will not able to log error, but if you does not catch Fatal errors so it is not your case.