Python on Apache and traceback

Andreas Jung ajung at sz-sb.de
Sun Apr 4 10:35:47 EDT 1999


On Sat, Apr 03, 1999 at 12:05:16AM -0800, kj7ny at email.com wrote:
> Before you flame my socks off, I know this is NOT the right place to
> probably ask this question, but I guarantee you there is no where better to
> get the right answer.
> 
> I am using Python on Apache on Win98.
> 
> Has anyone figured out how to get at the traceback errors when using Python
> on Apache? They are not automatically returned to the browser as they are on
> IIS and PWS.


Around your code with a try/except clause and catch the
traceback in the except clause. You can get the traceback
by using the traceback module. Logging can be achieved by
writing  the traceback to a file. 

I not sure if this is really neccessary because the traceback
of Python CGI scripts should be logged to the script or
error logfile of Apache.

Happy Easter,
Andreas

-- 
                                _\\|//_
                               (' O-O ')
------------------------------ooO-(_)-Ooo--------------------------------------
   Andreas Jung, Saarbrücker Zeitung Verlag und Druckerei GmbH
   Saarbrücker Daten-Innovations-Center
   Gutenbergstr. 11-23, D-66103 Saarbrücken, Germany
   Phone: +49-(0)681-502-1528, Fax: +49-(0)681-502-1509
   Email: ajung at sz-sb.de (PGP key available)
-------------------------------------------------------------------------------




More information about the Python-list mailing list