changeset 5186:5fb4e6f884ce

changeset: reduce log level of stack trace on innocent exceptions When the user performs an unallowed action and a flash is displayed, there is no need to log the stack trace at 'error' level. Reduce the stack trace log to debug instead.
author Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
date Thu, 11 Jun 2015 08:18:14 +0200
parents a6accd29d038
children 9a23b444a7fe
files kallithea/controllers/changeset.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/controllers/changeset.py	Sat Mar 28 21:08:01 2015 +0100
+++ b/kallithea/controllers/changeset.py	Thu Jun 11 08:18:14 2015 +0200
@@ -208,7 +208,7 @@
                 raise RepositoryError('Changeset range returned empty result')
 
         except(ChangesetDoesNotExistError,), e:
-            log.error(traceback.format_exc())
+            log.debug(traceback.format_exc())
             msg = _('Such revision does not exist for this repository')
             h.flash(msg, category='error')
             raise HTTPNotFound()
@@ -378,7 +378,7 @@
                     dont_allow_on_closed_pull_request=True
                 )
             except StatusChangeOnClosedPullRequestError:
-                log.error(traceback.format_exc())
+                log.debug(traceback.format_exc())
                 msg = _('Changing status on a changeset associated with '
                         'a closed pull request is not allowed')
                 h.flash(msg, category='warning')