diff --git a/isac_simo/settings.py b/isac_simo/settings.py index dbe84f6..7d28444 100644 --- a/isac_simo/settings.py +++ b/isac_simo/settings.py @@ -291,6 +291,11 @@ HONEYPOT_FIELD_NAME = "phonenumber" +# Create the syslg/errors.log +# if PRODUCTION: +# if not os.path.exists('syslg/errors.log'): +# with open('syslg/errors.log', 'w'): pass + LOGGING = { 'version': 1, 'disable_existing_loggers': False, @@ -315,11 +320,16 @@ 'level': 'ERROR', 'class': 'django.utils.log.AdminEmailHandler', 'include_html': True, - } + }, + 'console': { + 'level': 'WARNING', + 'class': 'logging.StreamHandler', + 'formatter': 'simple' + }, }, 'loggers': { 'django': { - 'handlers': ['error_file', 'mail_admins'] if PRODUCTION else ['error_file'], + 'handlers': ['error_file', 'mail_admins'] if PRODUCTION else ['console'], 'level': 'ERROR', 'propagate': True, }, diff --git a/syslg/.gitignore b/syslg/.gitignore new file mode 100644 index 0000000..c96a04f --- /dev/null +++ b/syslg/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore \ No newline at end of file