mirror of
https://github.com/jazzband/django-axes.git
synced 2026-05-17 20:11:08 +00:00
some controls on ouput verbosity
This commit is contained in:
parent
5df66876d7
commit
62dbac1c26
1 changed files with 6 additions and 1 deletions
|
|
@ -48,6 +48,11 @@ try:
|
|||
except:
|
||||
LOCKOUT_URL = None
|
||||
|
||||
try:
|
||||
VERBOSE = settings.AXES_VERBOSE
|
||||
except:
|
||||
VERBOSE = True
|
||||
|
||||
def query2str(items):
|
||||
return '\n'.join(['%s=%s' % (k, v) for k,v in items])
|
||||
|
||||
|
|
@ -87,7 +92,7 @@ def watch_login(func):
|
|||
|
||||
def decorated_login(request, *args, **kwargs):
|
||||
# share some useful information
|
||||
if func.__name__ != 'decorated_login':
|
||||
if func.__name__ != 'decorated_login' and VERBOSE:
|
||||
log.info('Calling decorated function: %s' % func)
|
||||
if args: log.info('args: %s' % args)
|
||||
if kwargs: log.info('kwargs: %s' % kwargs)
|
||||
|
|
|
|||
Loading…
Reference in a new issue