Issue #243: Change Log leve to INFO if
|Reported by:||Thomas Güttler|
|Created on:||2016-08-18 09:07|
|Updated on:||2018-05-21 13:37|
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?
Comment by Thomas Güttler, on 2016-08-18 09:08
Comment by Thomas Güttler, on 2016-08-18 09:09
Comment by Mads Kiilerich, on 2016-08-18 12:17
That seems reasonable. Will you try contributing a patch? http://kallithea.readthedocs.io/en/latest/contributing.html ;-)
Comment by Thomas De Schampheleire, on 2018-05-13 19:51
If I understood the suggestion correctly, it would be this patch. Is that correct?
diff --git a/kallithea/lib/auth.py b/kallithea/lib/auth.py --- a/kallithea/lib/auth.py +++ b/kallithea/lib/auth.py @@ -860,7 +860,7 @@ class _PermsDecorator(object): return func(*fargs, **fkwargs) else: - log.debug('Permission denied for %s %s', cls, user) + log.info('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')) else:
Comment by Thomas Güttler, on 2018-05-15 13:18
Yes, I think info() instead of debug() would be useful.
Comment by Thomas De Schampheleire, on 2018-05-19 20:01
Comment by Thomas De Schampheleire, on 2018-05-21 13:37
Fixed with 4c4e1ec26e95