Berker Peksag
560b4207b1
Removed redundant numbered parameters from str.format().
...
Since Python 2.7 and 3.1, "{0} {1}" is equivalent to "{} {}".
2014-12-03 14:27:38 -05:00
Berker Peksag
d552da1f8d
Fixed #22407 -- Added AdminEmailHandler.send_mail().
2014-11-15 09:38:19 +01:00
Tim Graham
9dff5ce7c7
Fixed #23593 -- Fixed crash in AdminEmailHandler with non-ASCII characters in request.
...
Thanks edevil for the report and Simon Charette for review.
2014-10-06 17:35:53 -04:00
Seth Hill
fe2afcd318
Fixed #23569 -- Allowed using configs besides dictConfig in LOGGING_CONFIG.
2014-09-30 17:13:27 -04:00
Alex Gaynor
778ce245dd
Corrected many style guide violations that the newest version of flake8 catches
2014-03-30 12:11:05 -07:00
Claude Paroz
0c6a339952
Avoided changing raw DeprecationWarning filter behavior
...
Refs #21188 . Now pure Python DeprecationWarning visibility should
be back to Python defaults.
2014-03-08 11:13:48 +01:00
Berker Peksag
5d263dee30
Fixed #21674 -- Deprecated the import_by_path() function in favor of import_string().
...
Thanks Aymeric Augustin for the suggestion and review.
2014-02-08 11:12:19 -05:00
Claude Paroz
b8e3373f45
Fixed #21714 -- Moved logging configuration to global setup()
...
Thanks Aymeric Augustin for the report and the review.
2013-12-31 18:35:00 +01:00
Tim Graham
36ded01527
Fixed #21302 -- Fixed unused imports and import *.
2013-11-02 15:24:56 -04:00
Daniel Sokolowski
ad6fcdb8d2
Fixed #20844 -- Made AdminEmailHandler respect LOGGING 'formatter' setting.
2013-09-13 07:27:54 -04:00
Aymeric Augustin
6c66a41c3d
Relied on NullHandler from the logging stdlib module.
2013-07-01 23:16:25 +02:00
Aymeric Augustin
72c65fea41
Deprecated django.utils.dictconfig.
...
The module still exists for whoever uses it in its current state, but it
isn't imported by Django anywhere.
2013-07-01 22:50:58 +02:00
Ramiro Morales
0fa8d43e74
Replaced `and...or...` constructs with PEP 308 conditional expressions.
2013-05-26 23:47:50 -03:00
Preston Holmes
d228c1192e
Fixed #19866 -- Added security logger and return 400 for SuspiciousOperation.
...
SuspiciousOperations have been differentiated into subclasses, and
are now logged to a 'django.security.*' logger. SuspiciousOperations
that reach django.core.handlers.base.BaseHandler will now return a 400
instead of a 500.
Thanks to tiwoc for the report, and Carl Meyer and Donald Stufft
for review.
2013-05-25 16:27:34 -07:00
Aymeric Augustin
9c487b5974
Replaced an antiquated pattern.
...
Thanks Lennart Regebro for pointing it out.
2013-05-17 18:08:58 +02:00
Claude Paroz
c6e0dedbdb
Fixed #19637 -- Ensured AdminEmailHandler fails silently
...
Thanks lsaffre for the report. Refs #19325 .
2013-01-21 20:32:36 +01:00
Aymeric Augustin
fb9f1b9bfb
Removed backwards-compatibility shim for #16288 .
...
Also unit-tested django.utils.log.RequireDebugTrue for consistency.
2012-12-29 21:58:12 +01:00
Hannes Struss
f9891f2087
Fixed #19325 - Made email backend of AdminEmailHandler configurable
2012-11-20 11:23:12 +01:00
Preston Holmes
44046e8a38
Fixed #18985 -- made DeprecationWarnings loud
...
Capture warnings in Python >= 2.7 and route through
console handler, which is subject to DEBUG==True
Thanks to dstufft for the idea, and claudep for initial patch
2012-11-16 17:07:38 -08:00
Adrian Holovaty
09a39ca082
Negligible spacing fix in utils/log.py
2012-11-12 14:19:11 -06:00
Claude Paroz
10e505b1b3
Moved filter at handler level
...
Filters at logger level are only processed for messages directly
logged to the specific logger, not for loggers in the parent chain.
As the 'django' logger is almost always processed as an inherited
logger, it makes more sense to filter messages at the 'console'
handler level.
2012-09-29 23:50:34 +02:00
Claude Paroz
f0f327bbfe
Fixed #18993 -- 'django' logger logs to console when DEBUG=True
...
Thanks Preston Holmes for the review.
2012-09-29 22:56:18 +02:00
Claude Paroz
a014ddfef2
Combined Django DEFAULT_LOGGING with user LOGGING config
...
Refs #18993 .
2012-09-29 22:56:18 +02:00
Jannis Leidel
1c9c29b5b2
Fixed AdminEmailHandler to format the subject message correctly when arguments are passed.
...
This bug was hidden before r17480 as it basically didn't take the arguments into account. Refs #14973 .
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17512 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-12 12:19:02 +00:00
Julien Phalip
995f7a16a8
Fixed #17281 -- Prevented `AdminErrorHandler` from silently failing if the log message contains newlines. Thanks to Russell Keith-Magee for the report and to Bartolome Sanchez Salado and Marcin Wróbel for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17501 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-11 09:31:18 +00:00
Carl Meyer
343004c4de
Fixed #16568 -- Added RequireDebugFalse filter to prevent sending 500 error emails when DEBUG is True in projects with no explicit LOGGING setting. Thanks to Andreas Pelme for report and patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16840 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-16 16:41:38 +00:00
Julien Phalip
de35a3ab14
Fixed #16736 -- Enabled the merging of user-supplied arguments to format the error emails' subject in `AdminEmailHandler`.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16715 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-02 03:04:02 +00:00
Jannis Leidel
24f4764a48
Fixed #16225 -- Removed unused imports. Many thanks to Aymeric Augustin for the work on the patch and Alex for reviewing.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16539 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-13 09:35:51 +00:00
Carl Meyer
43503b093a
Fixed #16288 -- Enabled django.request exception logger regardless of DEBUG setting.
...
Thanks Matt Bennett for report and draft patch; Vinay Sajip and Russell Keith-Magee for review.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16444 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-22 06:01:44 +00:00
Luke Plant
45e55b9143
Fixed #14614 - filtering of sensitive information in 500 error reports.
...
This adds a flexible mechanism for filtering what request/traceback
information is shown in 500 error emails and logs. It also applies
screening to some views known to be sensitive e.g. views that handle
passwords.
Thanks to oaylanc for the report and many thanks to Julien Phalip for the
patch and the rest of the work on this.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16339 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-08 22:18:46 +00:00
Adrian Holovaty
94af19c43f
Changed e-mail to email throughout documentation and codebase. The one exception is translation strings, which I didn't want to disrupt
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15967 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-01 16:10:22 +00:00
Adrian Holovaty
13864703bc
Removed a bunch more Python 2.4 workarounds now that we don't support that version. Refs #15702 -- thanks to jonash for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15927 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-28 02:11:19 +00:00
Russell Keith-Magee
7ab5ce6cf1
Fixed #15628 -- Made the admin error email more useful when there isn't a request associated with the message. Thanks to hynek for the report and patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15869 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-17 10:33:08 +00:00
Adrian Holovaty
304a50d8ca
Fixed #15603 -- Changed the traceback error e-mails not to use HTML by default. It's now configurable with an 'include_html' parameter to AdminEmailHandler. Thanks, kmtracey
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15850 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-16 04:13:57 +00:00
Russell Keith-Magee
9a82eb6ff1
Fixed #14972 -- Ensure that the HTML email logger always produces useful output, regardless of whether it has been given an exception or a request. Thanks to jamstooks for the report, and bpeschier for the initial patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15383 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-01 14:18:07 +00:00
Russell Keith-Magee
2a5105ac15
Fixed #14973 -- Tweaked the email log handler so that the log message is actually reported.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15132 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-03 12:07:19 +00:00
Jannis Leidel
5fadc86200
Fixed #14851 -- Swapped an argument order to fix compatibility with Python<2.6. Thanks for report and patch, mk.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14845 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-06 21:54:49 +00:00
Russell Keith-Magee
29c4a578af
Fixed #10863 -- Added HTML support to mail_managers() and mail_admins(), and used this to provide more and prettier detail in error emails. Thanks to boxed for the suggestion, and to Rob Hudson and Brodie Rao for their work on the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14844 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-06 14:21:51 +00:00
Russell Keith-Magee
fea159282b
Fixed #14406 -- Added a Python 2.4 compatibility to the logging interface. Thanks to Łukasz Rekucki for the report, and to Luke Plant for original patch this was based on.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13989 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-06 15:02:26 +00:00
Russell Keith-Magee
24acca4139
Fixed #12012 -- Added support for logging. Thanks to Vinay Sajip for his draft patch, and to the many people who gave feedback during development of the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13981 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-04 15:12:39 +00:00