Closed
Bug 750247
Opened 13 years ago
Closed 12 years ago
Use dictConfig logging configuration
Categories
(support.mozilla.org :: Code Quality, task, P3)
support.mozilla.org
Code Quality
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
Reporter | ||
Comment 1•13 years ago
|
||
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
Updated•13 years ago
|
Target Milestone: --- → 2012.10
Updated•13 years ago
|
Whiteboard: u=dev c=general p=
Updated•13 years ago
|
Priority: -- → P3
Updated•13 years ago
|
Whiteboard: u=dev c=general p= → u=dev c=general p=2
Updated•13 years ago
|
Target Milestone: 2012.10 → 2012.11
Updated•13 years ago
|
Target Milestone: 2012.11 → 2012.12
Comment 2•13 years ago
|
||
We are still waiting for Sentry setup, pushing this out during planning.
Target Milestone: 2012.12 → 2012Q3
Updated•12 years ago
|
Target Milestone: 2012Q3 → 2012Q4
Updated•12 years ago
|
Assignee: nobody → mcooper
Assignee | ||
Comment 3•12 years ago
|
||
Comment 4•12 years ago
|
||
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
Comment 5•12 years ago
|
||
Comment 6•12 years ago
|
||
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
Comment 7•12 years ago
|
||
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
Comment 8•12 years ago
|
||
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
Comment 9•12 years ago
|
||
Took a few commits, but this now has landed successfully on prod:
https://github.com/mozilla/kitsune/commit/f3f9bc70dce8878416331d12c30a4f216a391b78
https://github.com/mozilla/kitsune/commit/7d454efb4754befc268ecb3d52075d1622074681
https://github.com/mozilla/kitsune/commit/5591e504e43fc1774404278741939573c3ab2fe5
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Comment 10•12 years ago
|
||
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.
Description
•