2008/11/4 Martijn Pieters <[EMAIL PROTECTED]>:
>
> On Nov 4, 10:30 am, Martijn Pieters <[EMAIL PROTECTED]> wrote:
>> I also tried to add logging lines, but that would also cause the
>> segfault:
>>
>>   import logging
>>   logging.basicConfig(filename='/tmp/wsgi.log')
>>   logging.info('Loaded trac.wsgi')
>>
>>   def application(environ, start_response):
>>       status = '200 OK'
>>       response_headers = [('Content-type','text/plain')]
>>       start_response(status, response_headers)
>>       return ['Hello world!\n']
>>
>>   logging.info('Imported trac.web.main')
>>   logging.close()
>
> Correction, no crash occurs with logging.close(); instead, mod_wsgi
> correctly logs that the logging module has no 'close' attribute.
> logging.shutdown() instead works fine, although no information is ever
> written to the /tmp/wsgi.log file.

As per debugging document I referrer to, use instead:

  import sys

  print >> sys.stderr, "Loading WSGI script %s" __file__

Using this see if you can isolate it to be when trac module is
imported, or inside of actual request handler when executed.

Graham

Graham

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to