[FIX] logging, pg logging use thread db

bzr revid: al@openerp.com-20140412134728-vzn9247twgyfbcid
This commit is contained in:
Antony Lesuisse 2014-04-12 15:47:28 +02:00
parent e82fbf7d91
commit e69b086ecd
1 changed files with 1 additions and 1 deletions

View File

@ -86,7 +86,7 @@ class PostgreSQLHandler(logging.Handler):
if traceback:
msg = "%s\n%s" % (msg, traceback)
level = logging.getLevelName(record.levelno)
val = (ct_uid, ct_uid, 'server', dbname, record.name, level, msg, record.pathname, record.lineno, record.funcName)
val = (ct_uid, ct_uid, 'server', ct_db, record.name, level, msg, record.pathname, record.lineno, record.funcName)
cr.execute("""
INSERT INTO ir_logging(create_date, write_date, create_uid, write_uid, type, dbname, name, level, message, path, line, func)
VALUES (NOW() at time zone 'UTC', NOW() at time zone 'UTC', %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)