/*
- * $Id: access_log.cc,v 1.56 2000/03/25 04:58:39 wessels Exp $
+ * $Id: access_log.cc,v 1.57 2000/05/02 20:15:48 hno Exp $
*
* DEBUG: section 46 Access Log
* AUTHOR: Duane Wessels
#include "squid.h"
-static char *log_quote(const char *header);
static void accessLogSquid(AccessLogEntry * al);
static void accessLogCommon(AccessLogEntry * al);
static Logfile *logfile = NULL;
/* log_quote -- URL-style encoding on MIME headers. */
-static char *
+char *
log_quote(const char *header)
{
int c;
storeAppendPrintf(sentry, "avg service time: %d msec\n",
hlp->stats.avg_svc_time);
storeAppendPrintf(sentry, "\n");
- storeAppendPrintf(sentry, "%7s\t%7s\t%11s\t%s\t%7s\t%7s\n",
+ storeAppendPrintf(sentry, "%7s\t%7s\t%11s\t%s\t%7s\t%7s\t%7s\n",
"#",
"FD",
"# Requests",
"Flags",
"Time",
- "Offset");
+ "Offset",
+ "Request");
for (link = hlp->servers.head; link; link = link->next) {
srv = link->data;
tt = 0.001 * tvSubMsec(srv->dispatch_time, current_time);
- storeAppendPrintf(sentry, "%7d\t%7d\t%11d\t%c%c%c%c\t%7.3f\t%7d\n",
+ storeAppendPrintf(sentry, "%7d\t%7d\t%11d\t%c%c%c%c\t%7.3f\t%7d\t%s\n",
srv->index + 1,
srv->rfd,
srv->stats.uses,
srv->flags.closing ? 'C' : ' ',
srv->flags.shutdown ? 'S' : ' ',
tt < 0.0 ? 0.0 : tt,
- (int) srv->offset);
+ (int) srv->offset,
+ srv->request ? log_quote(srv->request->buf) : "(none)");
}
storeAppendPrintf(sentry, "\nFlags key:\n\n");
storeAppendPrintf(sentry, " A = ALIVE\n");
/*
- * $Id: protos.h,v 1.359 2000/05/02 18:32:41 hno Exp $
+ * $Id: protos.h,v 1.360 2000/05/02 20:15:49 hno Exp $
*
*
* SQUID Internet Object Cache http://squid.nlanr.net/Squid/
#if HEADERS_LOG
extern void headersLog(int cs, int pq, method_t m, void *data);
#endif
+char *log_quote(const char *header);
extern aclCheck_t *aclChecklistCreate(const struct _acl_access *,
request_t *,