[FIX] ir.logging: cursor should be in auto-commit

This commit is contained in:
Christophe Simonis 2015-05-11 19:01:37 +02:00
parent 04b252b72c
commit d8d3b38cbd
1 changed files with 1 additions and 0 deletions

View File

@ -82,6 +82,7 @@ class PostgreSQLHandler(logging.Handler):
if not dbname:
return
with tools.ignore(Exception), tools.mute_logger('openerp.sql_db'), sql_db.db_connect(dbname, allow_uri=True).cursor() as cr:
cr.autocommit(True)
msg = tools.ustr(record.msg)
if record.args:
msg = msg % record.args