I am logging db information to a file, but what I would really like to do is see the code that produces each query, or at least the file/line number.
Is there a way to do this? Using filename/funcName/etc (see http://docs.python.org/library/logging.html#logrecord-attributes) only log the lower level files/functions (i.e. 'execute' in 'utils.py', instead of my code).