Show More
@@ -44,17 +44,17 b' class _hgwebhandler(object, BaseHTTPServ' | |||||
44 | self.protocol_version = 'HTTP/1.1' |
|
44 | self.protocol_version = 'HTTP/1.1' | |
45 | BaseHTTPServer.BaseHTTPRequestHandler.__init__(self, *args, **kargs) |
|
45 | BaseHTTPServer.BaseHTTPRequestHandler.__init__(self, *args, **kargs) | |
46 |
|
46 | |||
|
47 | def _log_any(self, fp, format, *args): | |||
|
48 | fp.write("%s - - [%s] %s\n" % (self.client_address[0], | |||
|
49 | self.log_date_time_string(), | |||
|
50 | format % args)) | |||
|
51 | fp.flush() | |||
|
52 | ||||
47 | def log_error(self, format, *args): |
|
53 | def log_error(self, format, *args): | |
48 |
|
|
54 | self._log_any(self.server.errorlog, format, *args) | |
49 | errorlog.write("%s - - [%s] %s\n" % (self.client_address[0], |
|
|||
50 | self.log_date_time_string(), |
|
|||
51 | format % args)) |
|
|||
52 |
|
55 | |||
53 | def log_message(self, format, *args): |
|
56 | def log_message(self, format, *args): | |
54 |
|
|
57 | self._log_any(self.server.accesslog, format, *args) | |
55 | accesslog.write("%s - - [%s] %s\n" % (self.client_address[0], |
|
|||
56 | self.log_date_time_string(), |
|
|||
57 | format % args)) |
|
|||
58 |
|
58 | |||
59 | def do_write(self): |
|
59 | def do_write(self): | |
60 | try: |
|
60 | try: |
General Comments 0
You need to be logged in to leave comments.
Login now