Change Log leve to INFO if

Issue #243 resolved
Thomas Güttler created an issue

While debugging issue #242 I discovered that it would be useful to raise the log level of this message from DEBUG to INFO:

2016-08-17 23:47:58.841 DEBUG [kallithea.lib.auth] Permission to repo: repowhichfailed denied for user: readonly @ PermissionMiddleware

I would like to see it, if it failed. Maybe it's too much to log this message as INFO every time it was successful.

What do you think?

Comments (7)

  1. Thomas De Schampheleire

    If I understood the suggestion correctly, it would be this patch. Is that correct?

    diff --git a/kallithea/lib/ b/kallithea/lib/
    --- a/kallithea/lib/
    +++ b/kallithea/lib/
    @@ -860,7 +860,7 @@ class _PermsDecorator(object):
                 return func(*fargs, **fkwargs)
    -            log.debug('Permission denied for %s %s', cls, user)
    +  'Permission denied for %s %s', cls, user)
                 if user.is_default_user:
                     raise _redirect_to_login(_('You need to be signed in to view this page'))
  2. Log in to comment