简体   繁体   中英

Where is log for CGI Errors in IIS

I use IIS to run CGI scripts written on python (hgweb.cgi).

But if something goes wrong IIS doesn't provide detailed information. It just writes in log:

2018-10-20 10:14:52 W3SVC1 ::1 POST /hgweb.cgi/ cmd=unbundle 9000 - ::1 mercurial/proto-1.0+(Mercurial+4.1.3) - localhost:9000 502 2 1 295

Error 502. But why it was happened it doesn't write. I belive this error is detailed in stderr output of python script, but where to see it?

Make sure that iis logging is enable. If it's not enabled, you can see below link to find out:

How to enable logging in Internet Information Services (IIS)

My solution is: https://docs.python.org/2.0/lib/node246.html I redirected stderr to stdout and made try catch in script. This looks like a hack, but it works...

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