What is the standard way to log error messages in CGI programs. Using cout or printf in a CGI program, which is run by Apache (/var/www/cgi-bin), interrupts the communication while no messages are logged. How an error message can be redirected to Apache log file while it does not interrupt the communication and the execution of the application?