Closed Bug 750247 Opened 13 years ago Closed 12 years ago

Use dictConfig logging configuration

Categories

(support.mozilla.org :: Code Quality, task, P3)

Tracking

(Not tracked)

RESOLVED FIXED
2012Q4

People

(Reporter: jsocol, Assigned: mythmon)

References

Details

(Whiteboard: u=dev c=general p=2 s=2012.19)

We should get rid of log_settings and use the real/modern dictConfig logging configuration for Django[1]. That would make it much easier to set up Raven/Sentry[2] to handle logs as well as tracebacks. [1] https://docs.djangoproject.com/en/1.4/topics/logging/#an-example [2] http://raven.readthedocs.org/en/latest/config/django.html
See also https://github.com/mozilla/playdoh/issues/108. Can we get this into an upcoming sprint, it goes to maintainability and ease of upgrade. SUMO is at least 3 generations behind other Mozilla properties in logging config.
Component: General → Code Quality
QA Contact: general → code-quality
Target Milestone: --- → 2012.10
No longer blocks: 750235
Whiteboard: u=dev c=general p=
Priority: -- → P3
Whiteboard: u=dev c=general p= → u=dev c=general p=2
Target Milestone: 2012.10 → 2012.11
Target Milestone: 2012.11 → 2012.12
We are still waiting for Sentry setup, pushing this out during planning.
Target Milestone: 2012.12 → 2012Q3
Target Milestone: 2012Q3 → 2012Q4
Assignee: nobody → mcooper
I reverted back for now after pushing to stage and realizing we won't be getting any traceback emails with the default setup. I assume it just has to do with DEBUG being True when `'handlers': ['console' if DEBUG else 'syslog'],` is declared. If that's the case, then we just need to wait for Bug 797528 to be resolved.
Depends on: 797528
Actually, I think we need to add the mail_admins handler? 'mail_admins': { 'level': 'ERROR', 'class': 'django.utils.log.AdminEmailHandler', 'filters': ['special'] } https://docs.djangoproject.com/en/dev/topics/logging/#an-example
I think we should look at what zamboni did: https://github.com/mozilla/zamboni/blob/master/lib/log_settings_base.py They have a log_configure() that gets called from manage.py. That way the logging is configured once we have all the final settings loaded. This way we wouldn't need any changes at all from IT and don't have to have them paste the entire config into settings_local.py for each change. We should do this. I am going to WONTFIX the IT bug. We can file a new one or reopen if we end up needing anything from them
Part of me thinks we should incrementally change SUMO so it's more of a current playdoh project. Towards that, maybe we should use the same log settings stuff funfactory uses: https://github.com/mozilla/funfactory/blob/master/funfactory/log_settings.py
Adding s= sprint information to whiteboard.
Whiteboard: u=dev c=general p=2 → u=dev c=general p=2 s=2012.19
You need to log in before you can comment on or make changes to this bug.