Bug in log format

mj@d... mj@d...
Wed, 25 Apr 2001 14:59:45 -0000


Hi all,

Currently, the file logging writes all remote addreses, wether DNS 
resolved or not, with a trailing colon (':'):

(address): - - [(date)] "(request)" (status) (bytes)

The colon does not belong there, at least, not according to the CLF 
specs. Webalizer will not resolve ip addresses because it doesn't 
recognize them as ips, for example.

The colon seems to be a remnant of a change made in reference to a 
post to this list in 1999:

http://groups.yahoo.com/group/medusa/message/33

which removed the client port number from the log, but *not* the 
colon that separates the two.

The following patch removes the colon:

--- logger.py	2000/06/02 15:36:39	1.8
+++ logger.py	2001/04/25 14:57:23
@@ -227,7 +227,7 @@
def __call__ (self, host, ttl, answer):
if not answer:
answer = host
- self.logger.log ('%s:%s' % (answer, self.message))
+ self.logger.log ('%s%s' % (answer, self.message))

def log (self, ip, message):
self.resolver.resolve_ptr (
@@ -244,7 +244,7 @@
self.logger = logger

def log (self, ip, message):
- self.logger.log ('%s:%s' % (ip, message))
+ self.logger.log ('%s%s' % (ip, message))


def strip_eol (line):

Martijn Pieters
Digital Creations