Browse Source

update debugging to add timestamps for making query times easier..

main
John-Mark Gurney 2 years ago
parent
commit
a0f3da4c4c
1 changed files with 5 additions and 2 deletions
  1. +5
    -2
      ui/medashare/cli.py

+ 5
- 2
ui/medashare/cli.py View File

@@ -9,11 +9,14 @@ _real_stderr = sys.stderr
_sql_verbose = False

if False:
lvl = logging.DEBUG
lvl = logging.INFO
_handler = logging.StreamHandler(_real_stderr)
_handler.setLevel(logging.DEBUG)
_handler.setLevel(lvl)
_handler.setFormatter(logging.Formatter('%(asctime)s: %(message)s'))
import sqlalchemy
logging.getLogger('sqlalchemy').addHandler(_handler)
logging.getLogger('sqlalchemy.engine').setLevel(logging.DEBUG)
logging.getLogger('sqlalchemy.engine').setLevel(lvl)

def _debprint(*args): # pragma: no cover
import traceback, sys, os.path


Loading…
Cancel
Save