#23784: Error reporting docs needs to state clearly that changing logging conf error emails are not sent out unless configuring it again --------------------------------------+------------------------------------ Reporter: peterlauri | Owner: nschagen Type: Cleanup/optimization | Status: closed Component: Documentation | Version: 1.7 Severity: Normal | Resolution: invalid Keywords: | Triage Stage: Accepted Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 1 | UI/UX: 0 --------------------------------------+------------------------------------
Comment (by peterlauri): Replying to [comment:9 nschagen]: > According to django/conf/global_settings.py, LOGGING is an empty dictionary by default. There is also a DEFAULT_LOGGING in django/utils/log.py, which is where the default admin emailing behaviour is defined. DEFAULT_LOGGING and LOGGING are merged and therefore setting your own LOGGING conf does not break the email to admin feature. > > I have tested this by installing a FileHandler in both DEFAULT_LOGGING and LOGGING and the message was written to both files. Yes, I have read that. And I was not expecting admin email behaviour to break. But the below configuration breaks the admin email functionality, I have a test case where DEBUG=False and emails stop being sent. Removing the LOGGING completely OR re-adding makes it work again. Can you share your LOGGING config? {{{ LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'formatters': { 'verbose': { 'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s' }, 'simple': { 'format': '%(levelname)s %(message)s' }, }, 'handlers': { 'console': { 'class': 'logging.StreamHandler', 'stream': sys.stdout, 'formatter': 'simple' }, }, 'loggers': { 'django': { 'handlers': ['console'], 'level': 'INFO', 'propagate': True, }, } } }}} -- Ticket URL: <https://code.djangoproject.com/ticket/23784#comment:10> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/068.3024aac50abc490d19d285a37ada0b57%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.