[Zope-Checkins] CVS: Zope/ZServer - FCGIServer.py:1.13.16.1 PCGIServer.py:1.21.16.1
Matt Behrens
matt@zigg.com
Fri, 12 Apr 2002 12:23:08 -0400
Update of /cvs-repository/Zope/ZServer
In directory cvs.zope.org:/tmp/cvs-serv21947/ZServer
Modified Files:
Tag: Zope-2_5-branch
FCGIServer.py PCGIServer.py
Log Message:
#185, #341
=== Zope/ZServer/FCGIServer.py 1.13 => 1.13.16.1 ===
DebugLogger.log('E', id(self))
-
+
+ if self.env.has_key('HTTP_USER_AGENT'):
+ user_agent=self.env['HTTP_USER_AGENT']
+ else:
+ user_agent=''
+ if self.env.has_key('HTTP_REFERER'):
+ referer=self.env['HTTP_REFERER']
+ else:
+ referer=''
+
if self.env.has_key('PATH_INFO'):
path=self.env['PATH_INFO']
else:
@@ -448,24 +457,26 @@
if self.addr:
self.server.logger.log (
self.addr[0],
- '%s - - [%s] "%s %s" %d %d' % (
+ '%s - - [%s] "%s %s" %d %d "%s" "%s"' % (
self.addr[1],
time.strftime (
'%d/%b/%Y:%H:%M:%S ',
- time.gmtime(time.time())
+ time.localtime(time.time())
) + tz_for_log,
- method, path, self.reply_code, bytes
+ method, path, self.reply_code, bytes,
+ referer, user_agent
)
)
else:
self.server.logger.log (
- '127.0.0.1',
- '- - [%s] "%s %s" %d %d' % (
+ '127.0.0.1 ',
+ '- - [%s] "%s %s" %d %d "%s" "%s"' % (
time.strftime (
'%d/%b/%Y:%H:%M:%S ',
- time.gmtime(time.time())
+ time.localtime(time.time())
) + tz_for_log,
- method, path, self.reply_code, bytes
+ method, path, self.reply_code, bytes,
+ referer, user_agent
)
)
=== Zope/ZServer/PCGIServer.py 1.21 => 1.21.16.1 ===
def log_request(self, bytes):
+ if self.env.has_key('HTTP_USER_AGENT'):
+ user_agent=self.env['HTTP_USER_AGENT']
+ else:
+ user_agent=''
+ if self.env.has_key('HTTP_REFERER'):
+ referer=self.env['HTTP_REFERER']
+ else:
+ referer=''
+
if self.env.has_key('PATH_INFO'):
path=self.env['PATH_INFO']
else:
@@ -153,24 +162,26 @@
if addr and type(addr) is TupleType:
self.server.logger.log (
addr[0],
- '%d - - [%s] "%s %s" %d %d' % (
+ '%d - - [%s] "%s %s" %d %d "%s" "%s"' % (
addr[1],
time.strftime (
'%d/%b/%Y:%H:%M:%S ',
- time.gmtime(time.time())
+ time.localtime(time.time())
) + tz_for_log,
- method, path, self.reply_code, bytes
+ method, path, self.reply_code, bytes,
+ referer, user_agent
)
)
else:
self.server.logger.log (
'127.0.0.1',
- '- - [%s] "%s %s" %d %d' % (
+ ' - - [%s] "%s %s" %d %d "%s" "%s"' % (
time.strftime (
'%d/%b/%Y:%H:%M:%S ',
time.gmtime(time.time())
) + tz_for_log,
- method, path, self.reply_code, bytes
+ method, path, self.reply_code, bytes,
+ referer, user_agent
)
)