Commit Graph

23 Commits

Author SHA1 Message Date
rht f43e54d352 zerver/lib: Remove absolute_import. 2017-09-27 10:00:39 -07:00
Tim Abbott b4aa1336e7 logging: Avoid logging certain common 404 errors to error logs.
This should help keep /var/log/zulip/errors.log relatively clean on
production Zulip servers.
2017-09-16 08:07:06 -07:00
Aditya Bansal d9c9bfe7f6 logger: Add new create_logger abstraction to simplify logging.
This deduplicates a ton of Python logger-creation code to use a single
standard implementation, so we can avoid copy-paste problems.
2017-08-27 18:31:53 -07:00
Tim Abbott 3467a39cbd RateLimitFilter: Fix issues with unicode exceptions.
If you call str() on an exception with unicode characters in it, that
will itself throw an exception.
2017-07-07 16:51:04 -07:00
hackerkid b2504084ab Replace timezone.now with timezone_now. 2017-04-16 12:28:56 -07:00
hackerkid 55c3d12078 Replace timezone.utc with timezone_utc. 2017-04-16 12:28:56 -07:00
Tim Abbott 1a17b11788 logging_handlers: Add tests for main error reporting code path. 2017-03-26 13:10:43 -07:00
Rishi Gupta 4c88b3f5da logging_util: Fix timezone-naive datetime being compared to aware datetime.
Fixes regression in 3d07ac0.
2017-03-22 12:51:58 -07:00
Umair Khan e44e58f6d5 logging: Skip log records originated in site packages.
This fixes the huge exception we get in our logs from django.template
logger. This exception is a known bug in Django, see
https://code.djangoproject.com/ticket/26886

Fixes #3974
2017-03-15 11:07:31 -07:00
sinwar 6f0564e9f4 python: Fix remaining bare excepts in codebase.
Fixes #2862.
2017-03-05 16:17:04 -08:00
Rishi Gupta 3d07ac0c49 Change timezone-naive datetimes to use timezone.now() where safe to do so.
Change timezone-naive datetimes to use timezone.now() in cases where there
is no change in behavior.
2017-03-01 22:54:28 -08:00
Umair Khan ef0d2a4bb5 logging: Use django.server to filter 200 and 304.
Previously, we were monkey patching the runserver command
in zerver/management/commands/rundjango.py for this.
2017-02-10 15:55:17 -08:00
Tim Abbott 7f7cae332b logging: Fix handling of tracebacks with no exc_info. 2016-12-20 11:49:12 -08:00
nikolay abc2ff4a06 pep8: Fix many rule E128 violations.
[Tweaked by tabbott to adjust some approaches used in wrapping]
2016-12-03 13:33:31 -08:00
Tommy Ip e4091c6413 pep8: Fix E222 violations. 2016-11-30 21:49:02 +00:00
Tim Abbott e48cdb8d7e Fix python 3 compatibility in logging code.
Detected by mypy.
2016-09-09 15:36:29 -07:00
Tim Abbott 0d324d38b3 logging: Fix duplicate detection for email errors.
Our implementation of duplication detection in the Zulip email error
reporting system was buggy in two important ways:

* It did not look at the traceback, and thus considered all errors as
  the same.

* It reset the 10-minute duplicate timer every time an error happened,
  thus concealing situations where the same error was occuring more
  often than 1/10 minutes.
2016-09-08 16:55:36 -07:00
Max 86fb6467e7 Add annotations to avatar.py, db.py, logging_util.py, unminify.py.
Also, fixed a a small type annotation in users.py because email must
be a string because emails don't support UTF-8 at this time (according
a comment in gravatar_hash in avatar.py).
2016-06-05 12:38:20 -07:00
David Roe d702ddb3cf DEPLOYED => PRODUCTION
(imported from commit a7d365c07916c5103fc721c712db94f9af977640)
2015-08-21 10:33:35 -07:00
David Roe 24f6743288 Eliminate TESTING_DEPLOYED.
(imported from commit 477d8b7a15f703df1e10ae5682e02fea5ce040e4)
2015-08-21 10:33:35 -07:00
Luke Faraone 52309b5789 Enable absolute imports for non-third-party code where it was omitted previously
(imported from commit 34856ac32c6b94b614273a6fe46c87a314058d9b)
2013-10-25 14:13:30 -04:00
Tim Abbott d63a398716 Change Humbug => Zulip in name of error limiter module.
(imported from commit 55c5deba463faecc50da22e9745fd13ad8b11fd8)
2013-08-07 10:00:07 -04:00
Tim Abbott e111a2f9a5 [manual] Rename Django app from zephyr to zerver.
This needs to be deployed to both staging and prod at the same
off-peak time (and the schema migration run).

At the time it is deployed, we need to make a few changes directly in
the database:

(1) UPDATE django_content_type set app_label='zerver' where app_label='zephyr';
(2) UPDATE south_migrationhistory set app_name='zerver' where app_name='zephyr';

(imported from commit eb3fd719571740189514ef0b884738cb30df1320)
2013-08-06 07:39:36 -04:00