# HG changeset patch # User Christophe de Vienne # Date 1419852934 -3600 # Node ID 4b33246cb43ceb9231c323c1f1462c1a939f1ff2 # Parent 5cc8fdba56d5a86fe8b4fa608f89c553ef708e4f [native] Change SQL errors log level. - The SQL error itself is logged as 'info'. - The 'transaction has been rolled back' message is logged as 'debug'. These log entries should not be critical: - If an error occur at the sql level, it will be transmitted as a CW error. The exception is raised and handled in a higher level function, which will decide if it is critical or not. - Admitting that rolling-back automatically on errors is wanted in some cases, it cannot be considered 'critical'. The caller will receive the original exception anyway, it is its job to decide if it is critical or not. Closes #4801120 diff -r 5cc8fdba56d5 -r 4b33246cb43c server/sources/native.py --- a/server/sources/native.py Thu Jan 22 17:39:07 2015 +0100 +++ b/server/sources/native.py Mon Dec 29 12:35:34 2014 +0100 @@ -707,13 +707,13 @@ if self.repo.config.mode != 'test': # during test we get those message when trying to alter sqlite # db schema - self.critical("sql: %r\n args: %s\ndbms message: %r", + self.info("sql: %r\n args: %s\ndbms message: %r", query, args, ex.args[0]) if rollback: try: cnx.cnxset.rollback() if self.repo.config.mode != 'test': - self.critical('transaction has been rolled back') + self.debug('transaction has been rolled back') except Exception as ex: pass if ex.__class__.__name__ == 'IntegrityError':