﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
29329	Inconsistent datetime logging from runserver.	Sjoerd Job Postmus	Hasan Ramezani	"In Django 1.11 and higher, the runserver logging can sometimes be inconsistent.

{{{
[16/Apr/2018 13:32:35] ""GET /some/local/url HTTP/1.1"" 200 7927
[2018-04-16 13:32:35,745] - Broken pipe from ('127.0.0.1', 57570)
}}}

This is because logging from `WSGIRequestHandler` uses `server_time` as calculated using `BaseHTTPServer.log_date_time_string`. On the other hand, `WSGIServer` uses logging without providing a `server_time`. This gets ""fixed"" in `ServerFormatter.format` using `self.formatTime(record, self.datefmt)`, which uses a completely different format.

Currently we make this at least consistent by providing the `datefmt` parameter when constructing the logger, but it would be better if they were coded to be in sync (and configurable?).

(Looking into it further, it looks like we should be using `%(asctime)s` instead of `%(server_time)s`, but would be good if that were the suggested default. In https://docs.djangoproject.com/en/2.0/releases/1.10/#runserver-output-goes-through-logging we see `%(server_time)s`.)"	Cleanup/optimization	closed	Core (Other)	2.0	Normal	fixed			Accepted	1	0	0	0	0	0
