Added django core logging with default loglevel ERROR

Corrected logic for logging message in authentication/managers.py
This commit is contained in:
Adarnof 2016-01-03 08:57:52 +00:00
parent 583be5a72e
commit 6c3085f78c
2 changed files with 6 additions and 1 deletions

View File

@ -433,6 +433,10 @@ LOGGING = {
'handlers': ['log_file', 'console'], 'handlers': ['log_file', 'console'],
'level': 'DEBUG', 'level': 'DEBUG',
}, },
'django': {
'handlers': ['debug_file', 'console'],
'level': 'ERROR',
},
} }
} }

View File

@ -38,6 +38,7 @@ class AuthServicesInfoManager:
authserviceinfo.main_char_id = char_id authserviceinfo.main_char_id = char_id
authserviceinfo.save(update_fields=['main_char_id']) authserviceinfo.save(update_fields=['main_char_id'])
logger.info("Updated user %s main character to id %s" % (user, char_id)) logger.info("Updated user %s main character to id %s" % (user, char_id))
else:
logger.error("Failed to update user %s main character id to %s: user does not exist." % (user, char_id)) logger.error("Failed to update user %s main character id to %s: user does not exist." % (user, char_id))
@staticmethod @staticmethod