Lonerider
Lonerider

Reputation: 21

How to format logging for the python http.server

Using the python http.server (see https://docs.python.org/3/library/http.server.html), I am running this as a systemd service. In order to get the output of the server, I define StandardOutputand StandardError as appending to a log file. There I find entries like this (anonymized):

<IP address> - - [18/May/2023 21:58:54] "GET <path of HTML file> HTTP/1.1" 304 -

Now I would like to change the format of these entries:

Upvotes: 1

Views: 160

Answers (0)

Related Questions