Commit a4705138 authored by Sofia Papagiannaki's avatar Sofia Papagiannaki
Browse files

Configurable enable/disable additional logging

Refs: #2448
parent 9b6eb7a9
......@@ -67,7 +67,8 @@ def logged(func, msg):
user = request.user
email = user.email if user and user.is_authenticated() else ''
r = func(*args, **kwargs)
logger._log(LOGGING_LEVEL, msg % email, [])
if LOGGING_LEVEL:
logger._log(LOGGING_LEVEL, msg % email, [])
return r
return with_logging
......
......@@ -83,6 +83,6 @@ EMAILCHANGE_ENABLED = getattr(settings, 'ASTAKOS_EMAILCHANGE_ENABLED', False)
# Set the expiration time (in days) of email change requests
EMAILCHANGE_ACTIVATION_DAYS = getattr(settings, 'ASTAKOS_EMAILCHANGE_ACTIVATION_DAYS', 10)
# Set the astakos message logging severity
# Set the astakos main functions logging severity (None to disable)
from logging import INFO
LOGGING_LEVEL = getattr(settings, 'ASTAKOS_LOGGING_LEVEL', INFO)
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment