adding debug logging to show how often we're opening problem files (35x for /profile)

This commit is contained in:
David Ormsbee
2012-02-01 17:21:54 -05:00
parent 4926701efb
commit 167d2dd8fe

View File

@@ -1,4 +1,5 @@
import copy
import logging
import math
import numpy
import os
@@ -19,6 +20,8 @@ from responsetypes import numericalresponse, formularesponse, customresponse, sc
import calc
import eia
log = logging.getLogger("mitx.courseware")
response_types = {'numericalresponse':numericalresponse,
'formularesponse':formularesponse,
'customresponse':customresponse,
@@ -80,6 +83,7 @@ class LoncapaProblem(object):
self.seed=struct.unpack('i', os.urandom(4))[0]
## Parse XML file
log.debug(u"LoncapaProblem() opening file {0}".format(filename))
file_text = open(filename).read()
# Convert startouttext and endouttext to proper <text></text>
# TODO: Do with XML operations