Not sure if I've posted this before, but I have to keep remembering to
do this (must create a proper diff patch!)...

This is from http.c, around line 1268 from the current CVS (well, a day
or two a go now I think).
I've just tweaked the access_log output slightly so that webalizer can
generate reports from it.
There are three changes, the first is to use a "-" instead of " " if the
username is null.
The other two are reformatting the twp fprintf patterns slightly to
match what I'm seeing from my Apache 2.0 server.

I've left the msSpent on the end, I don't think Webalizer knows about
it, so it ignores it.

Hopefully someone finds this useful.

Later'ish
Craig



   if((theUser == NULL)
      || (theUser[0] == '\0'))
     strncpy(myUser, "-", 64);
   else {
     safe_snprintf(__FILE__, __LINE__, myUser, sizeof(myUser), " %s ",
theUser);
   }

   if(gzipBytesSent > 0)
     fprintf(myGlobals.accessLogFd, "%s %s - [%s %s] \"%s\" %d %u/%u - -
%lu\n",
             _addrtostr(requestFrom, buf, sizeof(buf)),
             myUser, theDate, theZone,
             httpRequestedURL, rc, gzipBytesSent, httpBytesSent,
             msSpent);
   else
     fprintf(myGlobals.accessLogFd, "%s %s - [%s %s] \"%s\" %d %u - -
%lu\n",
             _addrtostr(requestFrom, buf, sizeof(buf)),
             myUser, theDate, theZone,
             httpRequestedURL, rc, httpBytesSent,
             msSpent);
   fflush(myGlobals.accessLogFd);
_______________________________________________
Ntop-dev mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop-dev

Reply via email to