So fügen Sie die Antwortzeit im Gunicorn-Zugriffsprotokoll hinzuPython

Python-Programme
Anonymous
 So fügen Sie die Antwortzeit im Gunicorn-Zugriffsprotokoll hinzu

Post by Anonymous »

Ich habe eine gunicorn *config.py und muss Antwortzeit zum Gunicorn-Zugriffsprotokoll hinzufügen:
Das habe ich:

Code: Select all

...
accesslog = some_path/filename
access_log_format = '%(h)s %(l)s %(u)s %(t)s "%(r)s" %(s)s %(b)s "%(f)s" "%(a)s"'
...
Gunicorn-Version 19.7.1
Einige weitere Details:
*config.py enthielt zuvor nicht die Einstellung „access_log_format“ und ich dachte, das Hinzufügen könnte helfen, aber selbst nachdem ich den Prozess hinzugefügt und neu gestartet habe, enthält das Zugriffsprotokoll dieselben Parameter wie zuvor:

Code: Select all

 - - [16/Aug/2020:14:11:35 XDT] "POST /ws/v1/sessions?userId= HTTP/1.1" 200 537 "-" "python-requests/2.22.0"
 - - [16/Aug/2020:14:11:56 XDT] "DELETE /ws/v1/sessions HTTP/1.1" 200 139 "-" "python-requests/2.22.0"
 - - [17/Aug/2020:04:05:40 XDT] "GET /ws/v1/data-specs HTTP/1.1" 200 35097 "-" "python-requests/2.22.0"
 - - [17/Aug/2020:09:30:31 XDT] "GET /ws/v1/data-specs HTTP/1.1" 200 35097 "-" "python-requests/2.22.0"
Ich bin neu in Python, Gunicorn und Web-APIs. Ich kann nicht herausfinden, wie ich die Antwortzeit zum Protokoll hinzufügen kann. Was mache ich hier falsch? Bitte helfen Sie.

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post