Revision 3236
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/sql.py | ||
---|---|---|
475 | 475 |
if recover == None: recover = False |
476 | 476 |
if log_ignore_excs == None: log_ignore_excs = () |
477 | 477 |
log_ignore_excs = tuple(log_ignore_excs) |
478 |
debug_msg_ref = [None] |
|
478 | 479 |
|
479 |
debug_msg_ref = None # usually, db.run_query() logs query before running it |
|
480 |
# But if filtering with log_ignore_excs, wait until after exception parsing |
|
481 |
if log_ignore_excs != () or not db.can_mogrify(): debug_msg_ref = [None] |
|
482 |
|
|
483 | 480 |
try: |
484 | 481 |
try: |
485 | 482 |
def run(): return db.run_query(query, cacheable, log_level, |
... | ... | |
526 | 523 |
log_level += 2 |
527 | 524 |
raise |
528 | 525 |
finally: |
529 |
if debug_msg_ref != None and debug_msg_ref[0] != None: |
|
530 |
db.log_debug(debug_msg_ref[0], log_level) |
|
526 |
if debug_msg_ref[0] != None: db.log_debug(debug_msg_ref[0], log_level) |
|
531 | 527 |
|
532 | 528 |
##### Basic queries |
533 | 529 |
|
Also available in: Unified diff
sql.py: run_query(): Always output the log message after the query is run, so that it can be output with profiling statistics in the log message header