Use set_error_handler, take --log-file.
Default log file.