From ef4151fcb970178d51ac9b9e6a9e02be9f5d48c2 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Fri, 3 Sep 2010 10:58:04 +0200 Subject: [IMP] sql_db: promote some debug_sql to info or warning bzr revid: chs@openerp.com-20100903085804-p0yij5nly1d076c7 --- bin/sql_db.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'bin/sql_db.py') diff --git a/bin/sql_db.py b/bin/sql_db.py index 76a9e6f5f7c..28676d772db 100644 --- a/bin/sql_db.py +++ b/bin/sql_db.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (). # @@ -15,7 +15,7 @@ # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . +# along with this program. If not, see . # ############################################################################## @@ -126,7 +126,7 @@ class Cursor(object): self.__logger.error("Programming error: %s, in query %s", pe, query) raise except Exception: - self.__logger.exception("bad query: %s", self._obj.query) + self.__logger.exception("bad query: %s", self._obj.query or query) raise if self.sql_log: @@ -268,7 +268,7 @@ class ConnectionPool(object): delattr(cnx, 'leaked') self._connections.pop(i) self._connections.append((cnx, False)) - self._debug('Free leaked connection to %r', cnx.dsn) + self.__logger.warn('%r: Free leaked connection to %r', self, cnx.dsn) for i, (cnx, used) in enumerate(self._connections): if not used and dsn_are_equals(cnx.dsn, dsn): @@ -311,7 +311,7 @@ class ConnectionPool(object): @locked def close_all(self, dsn): - self._debug('Close all connections to %r', dsn) + self.__logger.info('%r: Close all connections to %r', self, dsn) for i, (cnx, used) in tools.reverse_enumerate(self._connections): if dsn_are_equals(cnx.dsn, dsn): cnx.close() -- cgit v1.2.3