简体   繁体   中英

Redirect error messages in CGI to Apache log file

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?

尝试使用cerr或:

fprintf(stderr, "log messages");

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM