How to enable logging?

svejk

New Member
Messages
2
Reaction score
0
Points
0
I have a rather hard time debugging my Python CGI scripts running into
"500 - Internal Server Error", which doesn't result in any useful output in Apache's error.log. Only trivial 404- (file doesn't exist) errors get logged on mistyped URLs. So how do you enable maximal error logging in Apache and/or its handlers?

To clarify: I have basic Python CGI scripts working, the problems seems to be connected with X10Hosting using an outdated Python version (2.4.x) vs. my development on 2.5.x. But without proper error logging, any backwards porting to 2.4.x gets extremely time-consuming.


svejk
 

woiwky

New Member
Messages
390
Reaction score
0
Points
0
I'm not too sure if that's possible without an admin doing it, and I think that's highly unlikely. I believe you're talking about changing the LogLevel directive, and I don't think you can do that with a .htaccess file. I'm quite sure that can only be set in the httpd.conf file which we don't have access to.

Wouldn't it make more sense to put the same version of python that x10 uses on your computer so you can do all the debugging locally?
 

svejk

New Member
Messages
2
Reaction score
0
Points
0
I'm not too sure if that's possible without an admin doing it, and I think that's highly unlikely. I believe you're talking about changing the LogLevel directive, and I don't think you can do that with a .htaccess file. I'm quite sure that can only be set in the httpd.conf file which we don't have access to.

Wouldn't it make more sense to put the same version of python that x10 uses on your computer so you can do all the debugging locally?

Thanks, I was thinking of some .htaccess configuration quirk, yes.
Yes, I'm doing most of my porting and debugging locally. I got Python 2.4.4, and there seems to a lot of issues with 2.4 missing the finally clause and with-statement, probably resulting in the byte code-compilation failing, thus not letting cgitb give any useful debugging output in the browser.

Well, since I'm not paying for this service, I probably deserve this almost 2 years old Python implementation ;)

But, I still want the option of viewing the whole stack trace from the Python process in some log file. I don't think silently discarding error diagnostics in this manner, leads to easy maintenance. What if some more difficult misconfiguration problem occurs?
 
Top