Project

General

Profile

Bug #36017

filtre de log vs request pas un objet Request django

Added by Frédéric Péters 5 days ago. Updated about 9 hours ago.

Status:
Solution déployée
Priority:
Normal
Category:
-
Target version:
-
Start date:
11 Sep 2019
Due date:
% Done:

0%

Patch proposed:
Yes
Planning:
No

Description

Comme #35629 mais partout.

Traceback (most recent call last):
  File "/usr/lib/python2.7/wsgiref/handlers.py", line 86, in run
    self.finish_response()
  File "/usr/lib/python2.7/wsgiref/handlers.py", line 131, in finish_response
    self.close()
  File "/usr/lib/python2.7/wsgiref/simple_server.py", line 33, in close
    self.status.split(' ',1)[0], self.bytes_sent
  File "/usr/lib/python2.7/BaseHTTPServer.py", line 433, in log_request
    self.requestline, str(code), str(size))
  File "/usr/lib/python2.7/dist-packages/django/core/servers/basehttp.py", line 124, in log_message
    level(format, *args, extra=extra)
  File "/usr/lib/python2.7/logging/__init__.py", line 1167, in info
    self._log(INFO, msg, args, **kwargs)
  File "/usr/lib/python2.7/logging/__init__.py", line 1286, in _log
    self.handle(record)
  File "/usr/lib/python2.7/logging/__init__.py", line 1296, in handle
    self.callHandlers(record)
  File "/usr/lib/python2.7/logging/__init__.py", line 1336, in callHandlers
    hdlr.handle(record)
  File "/usr/lib/python2.7/logging/__init__.py", line 755, in handle
    rv = self.filter(record)
  File "/usr/lib/python2.7/logging/__init__.py", line 617, in filter
    if not f.filter(record):
  File "/usr/lib/python2.7/dist-packages/hobo/logger.py", line 95, in filter
    record.ip = request.META.get('REMOTE_ADDR', self.DEFAULT_IP)
AttributeError: '_socketobject' object has no attribute 'META'

0001-logger-skip-request-objects-that-are-actually-socket.patch View (961 Bytes) Frédéric Péters, 11 Sep 2019 09:42 AM

Associated revisions

Revision a4b8d7b5 (diff)
Added by Frédéric Péters 5 days ago

logger: skip request objects that are actually socket objects (#36017)

History

#1 Updated by Frédéric Péters 5 days ago

#2 Updated by Emmanuel Cazenave 5 days ago

  • Status changed from Solution proposée to Solution validée

#3 Updated by Frédéric Péters 5 days ago

  • Status changed from Solution validée to Résolu (à déployer)
commit a4b8d7b583d3cb4caf6e3b81059bfbf1f1a439e0
Author: Frédéric Péters <fpeters@entrouvert.com>
Date:   Wed Sep 11 09:41:34 2019 +0200

    logger: skip request objects that are actually socket objects (#36017)

#4 Updated by Frédéric Péters about 9 hours ago

  • Status changed from Résolu (à déployer) to Solution déployée

Also available in: Atom PDF