Well my last reply was preemptery.
A minimal working example can be produced via the following commands. First navigate to a suitable directory then,
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'django.server': {
'()': 'django.utils.log.ServerFormatter',
'format': '[%(server_time)s] %(message)s %(request)r',
}
},
'handlers': {
'django.server': {
'level': 'INFO',
'class': 'logging.StreamHandler',
'formatter': 'django.server',
},
},
'loggers': {
'django.server': {
'handlers': ['django.server'],
'level': 'INFO',
'propagate': False,
},
}
}
Then :wq
# cd mwe
# python manage.py runserver
The normal error message about routing will show. Switch back to the console and you'll see:
# python manage.py runserver
Performing system checks...
System check identified no issues (0 silenced).
September 15, 2016 - 23:12:05
Django version 1.10.1, using settings 'mwe.settings'
Quit the server with CONTROL-C.
Not Found: /blargh
[15/Sep/2016 23:12:09] "GET /blargh HTTP/1.1" 404 1918 <socket._socketobject object at 0x7fa14d58da60>
That representation of the socket object is being produced by the "%(request)r" in the formatter.
Chasing this back through the call stack the request object is set in /usr/lib/python2.7/SocketServer.py(652)__init__() as the socket. This is seems reasonable to me, so I guess some kind of processing of the request isn't being performed somewhere.