diff options
author | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2012-08-26 23:17:10 -0400 |
---|---|---|
committer | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2012-08-26 23:17:10 -0400 |
commit | 337302e494329a2387262a40efc538dc2a620ee3 (patch) | |
tree | e64792623ff426d08a8bbf46f2630cf3d2d007a2 /askbot/utils | |
parent | 41a23a3a8e9adaf1b877c49f8d0d5eab007ae693 (diff) | |
download | askbot-337302e494329a2387262a40efc538dc2a620ee3.tar.gz askbot-337302e494329a2387262a40efc538dc2a620ee3.tar.bz2 askbot-337302e494329a2387262a40efc538dc2a620ee3.zip |
broken commit - migration 137 fails!
Diffstat (limited to 'askbot/utils')
-rw-r--r-- | askbot/utils/console.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/askbot/utils/console.py b/askbot/utils/console.py index a7787325..a691d961 100644 --- a/askbot/utils/console.py +++ b/askbot/utils/console.py @@ -2,8 +2,16 @@ """ import sys import time +import logging from askbot.utils import path +def start_printing_db_queries(): + """starts logging database queries into console, + should be used for debugging only""" + logger = logging.getLogger('django.db.backends') + logger.setLevel(logging.DEBUG) + logger.addHandler(logging.StreamHandler()) + def choice_dialog(prompt_phrase, choices = None, invalid_phrase = None): """prints a prompt, accepts keyboard input and makes sure that user response is one of given |