From 6c3085f78c2eb2bb3891d070f33da816c01d677f Mon Sep 17 00:00:00 2001 From: Adarnof Date: Sun, 3 Jan 2016 08:57:52 +0000 Subject: [PATCH] Added django core logging with default loglevel ERROR Corrected logic for logging message in authentication/managers.py --- alliance_auth/settings.py.example | 4 ++++ authentication/managers.py | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/alliance_auth/settings.py.example b/alliance_auth/settings.py.example index 6e90eeb8..92f56728 100755 --- a/alliance_auth/settings.py.example +++ b/alliance_auth/settings.py.example @@ -433,6 +433,10 @@ LOGGING = { 'handlers': ['log_file', 'console'], 'level': 'DEBUG', }, + 'django': { + 'handlers': ['debug_file', 'console'], + 'level': 'ERROR', + }, } } diff --git a/authentication/managers.py b/authentication/managers.py index dbccc4e4..c79a36cd 100755 --- a/authentication/managers.py +++ b/authentication/managers.py @@ -38,7 +38,8 @@ class AuthServicesInfoManager: authserviceinfo.main_char_id = char_id authserviceinfo.save(update_fields=['main_char_id']) logger.info("Updated user %s main character to id %s" % (user, char_id)) - logger.error("Failed to update user %s main character id to %s: user does not exist." % (user, char_id)) + else: + logger.error("Failed to update user %s main character id to %s: user does not exist." % (user, char_id)) @staticmethod def update_user_forum_info(username, password, user):