get path of basehttp.py
$ python >>> import site >>> site.getsitepackages() [‘/usr/lib64/python2.7/site-packages‘, ‘/usr/lib/python2.7/site-packages‘, ‘/usr/lib/site-python‘]
change log_message() msg = "[%s] %s\n" % (self.log_date_time_string(), format % args) to the following
msg = "[%s] (%s)" % (self.log_date_time_string(), self.client_address[0])
makes you looks like this
[09/Jan/2016 15:55:37] (127.0.0.1) "POST /m HTTP/1.0" 200 59
时间: 2024-11-07 16:46:04