diff options
| author | Fabien Pinckaers <fp@tinyerp.com> | 2010-09-18 11:30:52 +0200 |
|---|---|---|
| committer | Fabien Pinckaers <fp@tinyerp.com> | 2010-09-18 11:30:52 +0200 |
| commit | 9c62cde38f7b99b004907ff3f249294fd20dcc4b (patch) | |
| tree | 8fa01414298ae92509fa5817cc684a901320a6fa /bin/sql_db.py | |
| parent | 7abdaefd7c463f957fe775cd6060f8bc59881c77 (diff) | |
[IMP] improve debug for --log-level=debug_sql
bzr revid: fp@tinyerp.com-20100918093052-nxapeqahzt4cpr2m
Diffstat (limited to 'bin/sql_db.py')
| -rw-r--r-- | bin/sql_db.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/bin/sql_db.py b/bin/sql_db.py index 193a709dd8d..6c2c17beeb3 100644 --- a/bin/sql_db.py +++ b/bin/sql_db.py @@ -113,8 +113,6 @@ class Cursor(object): self.__logger.warn(query) self.__logger.warn("SQL queries cannot contain %d or %f anymore. " "Use only %s") - if params: - query = query.replace('%d', '%s').replace('%f', '%s') if self.sql_log: now = mdt.now() @@ -167,6 +165,7 @@ class Cursor(object): sqllogitems = sqllogs[type].items() sqllogitems.sort(key=lambda k: k[1][1]) self.__logger.log(logging.DEBUG_SQL, "SQL LOG %s:", type) + sqllogitems.sort(lambda x,y: cmp(x[1][0], y[1][0])) for r in sqllogitems: delay = timedelta(microseconds=r[1][1]) self.__logger.log(logging.DEBUG_SQL, "table: %s: %s/%s", |
