access_log.cc
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2017 The Squid Software Foundation and contributors
3  *
4  * Squid software is distributed under GPLv2+ license and includes
5  * contributions from numerous individuals and organizations.
6  * Please see the COPYING and CONTRIBUTORS files for details.
7  */
8 
9 /* DEBUG: section 46 Access Log */
10 
11 #include "squid.h"
12 #include "AccessLogEntry.h"
13 #include "acl/Checklist.h"
14 #if USE_ADAPTATION
15 #include "adaptation/Config.h"
16 #endif
17 #include "CachePeer.h"
18 #include "err_detail_type.h"
19 #include "errorpage.h"
20 #include "format/Token.h"
21 #include "globals.h"
22 #include "hier_code.h"
23 #include "HttpReply.h"
24 #include "HttpRequest.h"
25 #include "log/access_log.h"
26 #include "log/Config.h"
27 #include "log/CustomLog.h"
28 #include "log/File.h"
29 #include "log/Formats.h"
30 #include "MemBuf.h"
31 #include "mgr/Registration.h"
32 #include "rfc1738.h"
33 #include "SquidConfig.h"
34 #include "SquidTime.h"
35 #include "Store.h"
36 
37 #if USE_SQUID_EUI
38 #include "eui/Eui48.h"
39 #include "eui/Eui64.h"
40 #endif
41 
42 #if HEADERS_LOG
43 static Logfile *headerslog = NULL;
44 #endif
45 
46 #if MULTICAST_MISS_STREAM
47 static int mcast_miss_fd = -1;
48 
49 static struct sockaddr_in mcast_miss_to;
50 static void mcast_encode(unsigned int *, size_t, const unsigned int *);
51 #endif
52 
53 #if USE_FORW_VIA_DB
54 
55 typedef struct {
57  int n;
58 } fvdb_entry;
59 static hash_table *via_table = NULL;
60 static hash_table *forw_table = NULL;
61 static void fvdbInit();
62 static void fvdbDumpTable(StoreEntry * e, hash_table * hash);
63 static void fvdbCount(hash_table * hash, const char *key);
64 static OBJH fvdbDumpVia;
65 static OBJH fvdbDumpForw;
66 static FREE fvdbFreeEntry;
67 static void fvdbClear(void);
68 static void fvdbRegisterWithCacheManager();
69 #endif
70 
72 
73 void
75 {
76 
77  if (al->url.isEmpty())
78  al->url = Format::Dash;
79 
80  if (!al->http.content_type || *al->http.content_type == '\0')
81  al->http.content_type = dash_str;
82 
83  if (al->hier.host[0] == '\0')
84  xstrncpy(al->hier.host, dash_str, SQUIDHOSTNAMELEN);
85 
86  for (; log; log = log->next) {
87  if (log->aclList && checklist && !checklist->fastCheck(log->aclList).allowed())
88  continue;
89 
90  // The special-case "none" type has no logfile object set
91  if (log->type == Log::Format::CLF_NONE)
92  return;
93 
94  if (log->logfile) {
96 
97  switch (log->type) {
98 
101  break;
102 
105  break;
106 
109  break;
110 
113  break;
114 
117  break;
118 
120  Log::Format::SquidCustom(al, log);
121  break;
122 
123 #if ICAP_CLIENT
126  break;
127 #endif
128 
129  default:
130  fatalf("Unknown log format %d\n", log->type);
131  break;
132  }
133 
134  logfileLineEnd(log->logfile);
135  }
136 
137  // NP: WTF? if _any_ log line has no checklist ignore the following ones?
138  if (!checklist)
139  break;
140  }
141 }
142 
143 void
145 {
146  if (LogfileStatus != LOG_ENABLE)
147  return;
148 
149  accessLogLogTo(Config.Log.accesslogs, al, checklist);
150 #if MULTICAST_MISS_STREAM
151 
152  if (al->cache.code != LOG_TCP_MISS)
153  (void) 0;
154  else if (al->http.method != METHOD_GET)
155  (void) 0;
156  else if (mcast_miss_fd < 0)
157  (void) 0;
158  else {
159  unsigned int ibuf[365];
160  size_t isize;
161  xstrncpy((char *) ibuf, al->url.c_str(), 364 * sizeof(int));
162  isize = ((al->url.length() + 8) / 8) * 2;
163 
164  if (isize > 364)
165  isize = 364;
166 
167  mcast_encode((unsigned int *) ibuf, isize,
168  (const unsigned int *) Config.mcast_miss.encode_key);
169 
170  comm_udp_sendto(mcast_miss_fd,
171  &mcast_miss_to, sizeof(mcast_miss_to),
172  ibuf, isize * sizeof(int));
173  }
174 
175 #endif
176 }
177 
178 void
180 {
181  CustomLog *log;
182 #if USE_FORW_VIA_DB
183 
184  fvdbClear();
185 #endif
186 
187  for (log = Config.Log.accesslogs; log; log = log->next) {
188  if (log->logfile) {
189  int16_t rc = (log->rotateCount >= 0 ? log->rotateCount : Config.Log.rotateNumber);
190  logfileRotate(log->logfile, rc);
191  }
192  }
193 
194 #if HEADERS_LOG
195 
196  logfileRotate(headerslog, Config.Log.rotateNumber);
197 
198 #endif
199 }
200 
201 void
203 {
204  CustomLog *log;
205 
206  for (log = Config.Log.accesslogs; log; log = log->next) {
207  if (log->logfile) {
208  logfileClose(log->logfile);
209  log->logfile = NULL;
210  }
211  }
212 
213 #if HEADERS_LOG
214 
215  logfileClose(headerslog);
216 
217  headerslog = NULL;
218 
219 #endif
220 }
221 
223  code(HIER_NONE),
224  cd_lookup(LOOKUP_NONE),
225  n_choices(0),
226  n_ichoices(0),
227  peer_reply_status(Http::scNone),
228  tcpServer(NULL),
229  bodyBytesRead(-1)
230 {
231  memset(host, '\0', SQUIDHOSTNAMELEN);
232  memset(cd_host, '\0', SQUIDHOSTNAMELEN);
233 
234  peer_select_start.tv_sec =0;
235  peer_select_start.tv_usec =0;
236 
237  store_complete_stop.tv_sec =0;
238  store_complete_stop.tv_usec =0;
239 
240  clearPeerNotes();
241 
242  totalResponseTime_.tv_sec = -1;
243  totalResponseTime_.tv_usec = 0;
244 
245  firstConnStart_.tv_sec = 0;
246  firstConnStart_.tv_usec = 0;
247 }
248 
249 void
251 {
252  clearPeerNotes();
253 
254  tcpServer = server;
255  if (tcpServer == NULL) {
256  code = HIER_NONE;
257  xstrncpy(host, requestedHost, sizeof(host));
258  } else {
260 
261  if (tcpServer->getPeer()) {
262  // went to peer, log peer host name
263  xstrncpy(host, tcpServer->getPeer()->name, sizeof(host));
264  } else {
265  xstrncpy(host, requestedHost, sizeof(host));
266  }
267  }
268 }
269 
271 void
273 {
274  peer_last_read_.tv_sec = 0;
275  peer_last_read_.tv_usec = 0;
276 
277  peer_last_write_.tv_sec = 0;
278  peer_last_write_.tv_usec = 0;
279 
280  bodyBytesRead = -1;
281 }
282 
283 void
285 {
287 }
288 
289 void
291 {
293 }
294 
295 void
297 {
298  if (!firstConnStart_.tv_sec)
300 }
301 
302 void
304 {
305  debugs(46, 5, "First connection started: " << firstConnStart_.tv_sec << "." <<
306  std::setfill('0') << std::setw(6) << firstConnStart_.tv_usec <<
307  ", current total response time value: " << (totalResponseTime_.tv_sec * 1000 + totalResponseTime_.tv_usec/1000) <<
308  (force ? ", force fixing" : ""));
309  if (!force && totalResponseTime_.tv_sec != -1)
310  return;
311 
312  if (firstConnStart_.tv_sec)
314 }
315 
316 bool
317 HierarchyLogEntry::peerResponseTime(struct timeval &responseTime)
318 {
319  // no I/O whatsoever
320  if (peer_last_write_.tv_sec <= 0 && peer_last_read_.tv_sec <= 0)
321  return false;
322 
323  // accommodate read without (completed) write
324  const auto last_write = peer_last_write_.tv_sec > 0 ?
326 
327  // accommodate write without (completed) read
328  const auto last_read = peer_last_read_.tv_sec > 0 ?
330 
331  tvSub(responseTime, last_write, last_read);
332  // The peer response time (%<pt) stopwatch is currently defined to start
333  // when we wrote the entire request. Thus, if we wrote something after the
334  // last read, report zero peer response time.
335  if (responseTime.tv_sec < 0) {
336  responseTime.tv_sec = 0;
337  responseTime.tv_usec = 0;
338  }
339 
340  return true;
341 }
342 
343 bool
344 HierarchyLogEntry::totalResponseTime(struct timeval &responseTime)
345 {
346  // This should not really happen, but there may be rare code
347  // paths that lead to FwdState discarded (or transaction logged)
348  // without (or before) a stopPeerClock() call.
349  if (firstConnStart_.tv_sec && totalResponseTime_.tv_sec == -1)
350  stopPeerClock(false);
351 
352  responseTime = totalResponseTime_;
353  return responseTime.tv_sec >= 0 && responseTime.tv_usec >= 0;
354 }
355 
356 static void
358 {
359 #if USE_FORW_VIA_DB
360  fvdbRegisterWithCacheManager();
361 #endif
362 }
363 
364 void
366 {
367  CustomLog *log;
368 
370 
371 #if USE_ADAPTATION
373 #endif
374 #if ICAP_CLIENT
376 #endif
377 
378  for (log = Config.Log.accesslogs; log; log = log->next) {
379  if (log->type == Log::Format::CLF_NONE)
380  continue;
381 
382  log->logfile = logfileOpen(log->filename, log->bufferSize, log->fatal);
383 
384  LogfileStatus = LOG_ENABLE;
385 
386 #if USE_ADAPTATION
387  for (Format::Token * curr_token = (log->logFormat?log->logFormat->format:NULL); curr_token; curr_token = curr_token->next) {
388  if (curr_token->type == Format::LFT_ADAPTATION_SUM_XACT_TIMES ||
389  curr_token->type == Format::LFT_ADAPTATION_ALL_XACT_TIMES ||
390  curr_token->type == Format::LFT_ADAPTATION_LAST_HEADER ||
391  curr_token->type == Format::LFT_ADAPTATION_LAST_HEADER_ELEM ||
392  curr_token->type == Format::LFT_ADAPTATION_LAST_ALL_HEADERS||
393  (curr_token->type == Format::LFT_NOTE && !Adaptation::Config::metaHeaders.empty())) {
395  }
396 #if ICAP_CLIENT
397  if (curr_token->type == Format::LFT_ICAP_TOTAL_TIME) {
399  }
400 #endif
401  }
402 #endif
403  }
404 
405 #if HEADERS_LOG
406 
407  headerslog = logfileOpen("/usr/local/squid/logs/headers.log", 512);
408 
409  assert(NULL != headerslog);
410 
411 #endif
412 #if MULTICAST_MISS_STREAM
413 
414  if (Config.mcast_miss.addr.s_addr != no_addr.s_addr) {
415  memset(&mcast_miss_to, '\0', sizeof(mcast_miss_to));
416  mcast_miss_to.sin_family = AF_INET;
417  mcast_miss_to.sin_port = htons(Config.mcast_miss.port);
418  mcast_miss_to.sin_addr.s_addr = Config.mcast_miss.addr.s_addr;
419  mcast_miss_fd = comm_open(SOCK_DGRAM,
420  IPPROTO_UDP,
424  "Multicast Miss Stream");
425 
426  if (mcast_miss_fd < 0)
427  fatal("Cannot open Multicast Miss Stream Socket");
428 
429  debugs(46, DBG_IMPORTANT, "Multicast Miss Stream Socket opened on FD " << mcast_miss_fd);
430 
431  mcastSetTtl(mcast_miss_fd, Config.mcast_miss.ttl);
432 
433  if (strlen(Config.mcast_miss.encode_key) < 16)
434  fatal("mcast_encode_key is too short, must be 16 characters");
435  }
436 
437 #endif
438 #if USE_FORW_VIA_DB
439 
440  fvdbInit();
441 
442 #endif
443 }
444 
445 #if USE_FORW_VIA_DB
446 
447 static void
448 fvdbInit(void)
449 {
450  via_table = hash_create((HASHCMP *) strcmp, 977, hash4);
451  forw_table = hash_create((HASHCMP *) strcmp, 977, hash4);
452 }
453 
454 static void
455 fvdbRegisterWithCacheManager(void)
456 {
457  Mgr::RegisterAction("via_headers", "Via Request Headers", fvdbDumpVia, 0, 1);
458  Mgr::RegisterAction("forw_headers", "X-Forwarded-For Request Headers",
459  fvdbDumpForw, 0, 1);
460 }
461 
462 static void
463 fvdbCount(hash_table * hash, const char *key)
464 {
465  fvdb_entry *fv;
466 
467  if (NULL == hash)
468  return;
469 
470  fv = (fvdb_entry *)hash_lookup(hash, key);
471 
472  if (NULL == fv) {
473  fv = static_cast <fvdb_entry *>(xcalloc(1, sizeof(fvdb_entry)));
474  fv->hash.key = xstrdup(key);
475  hash_join(hash, &fv->hash);
476  }
477 
478  ++ fv->n;
479 }
480 
481 void
482 fvdbCountVia(const char *key)
483 {
484  fvdbCount(via_table, key);
485 }
486 
487 void
488 fvdbCountForw(const char *key)
489 {
490  fvdbCount(forw_table, key);
491 }
492 
493 static void
494 fvdbDumpTable(StoreEntry * e, hash_table * hash)
495 {
496  hash_link *h;
497  fvdb_entry *fv;
498 
499  if (hash == NULL)
500  return;
501 
502  hash_first(hash);
503 
504  while ((h = hash_next(hash))) {
505  fv = (fvdb_entry *) h;
506  storeAppendPrintf(e, "%9d %s\n", fv->n, hashKeyStr(&fv->hash));
507  }
508 }
509 
510 static void
511 fvdbDumpVia(StoreEntry * e)
512 {
513  fvdbDumpTable(e, via_table);
514 }
515 
516 static void
517 fvdbDumpForw(StoreEntry * e)
518 {
519  fvdbDumpTable(e, forw_table);
520 }
521 
522 static
523 void
524 fvdbFreeEntry(void *data)
525 {
526  fvdb_entry *fv = static_cast <fvdb_entry *>(data);
527  xfree(fv->hash.key);
528  xfree(fv);
529 }
530 
531 static void
532 fvdbClear(void)
533 {
534  hashFreeItems(via_table, fvdbFreeEntry);
535  hashFreeMemory(via_table);
536  via_table = hash_create((HASHCMP *) strcmp, 977, hash4);
537  hashFreeItems(forw_table, fvdbFreeEntry);
538  hashFreeMemory(forw_table);
539  forw_table = hash_create((HASHCMP *) strcmp, 977, hash4);
540 }
541 
542 #endif
543 
544 #if MULTICAST_MISS_STREAM
545 /*
546  * From http://www.io.com/~paulhart/game/algorithms/tea.html
547  *
548  * size of 'ibuf' must be a multiple of 2.
549  * size of 'key' must be 4.
550  * 'ibuf' is modified in place, encrypted data is written in
551  * network byte order.
552  */
553 static void
554 mcast_encode(unsigned int *ibuf, size_t isize, const unsigned int *key)
555 {
556  unsigned int y;
557  unsigned int z;
558  unsigned int sum;
559  const unsigned int delta = 0x9e3779b9;
560  unsigned int n = 32;
561  const unsigned int k0 = htonl(key[0]);
562  const unsigned int k1 = htonl(key[1]);
563  const unsigned int k2 = htonl(key[2]);
564  const unsigned int k3 = htonl(key[3]);
565  int i;
566 
567  for (i = 0; i < isize; i += 2) {
568  y = htonl(ibuf[i]);
569  z = htonl(ibuf[i + 1]);
570  sum = 0;
571 
572  for (n = 32; n; --n) {
573  sum += delta;
574  y += (z << 4) + (k0 ^ z) + (sum ^ (z >> 5)) + k1;
575  z += (y << 4) + (k2 ^ y) + (sum ^ (y >> 5)) + k3;
576  }
577 
578  ibuf[i] = htonl(y);
579  ibuf[i + 1] = htonl(z);
580  }
581 }
582 
583 #endif
584 
585 #if HEADERS_LOG
586 void
587 headersLog(int cs, int pq, const HttpRequestMethod& method, void *data)
588 {
589  HttpReply *rep;
590  HttpRequest *req;
591  unsigned short magic = 0;
592  unsigned char M = (unsigned char) m;
593  char *hmask;
594  int ccmask = 0;
595 
596  if (0 == pq) {
597  /* reply */
598  rep = data;
599  req = NULL;
600  magic = 0x0050;
601  hmask = rep->header.mask;
602 
603  if (rep->cache_control)
604  ccmask = rep->cache_control->mask;
605  } else {
606  /* request */
607  req = data;
608  rep = NULL;
609  magic = 0x0051;
610  hmask = req->header.mask;
611 
612  if (req->cache_control)
613  ccmask = req->cache_control->mask;
614  }
615 
616  if (0 == cs) {
617  /* client */
618  magic |= 0x4300;
619  } else {
620  /* server */
621  magic |= 0x5300;
622  }
623 
624  magic = htons(magic);
625  ccmask = htonl(ccmask);
626 
627  unsigned short S = 0;
628  if (0 == pq)
629  S = static_cast<unsigned short>(rep->sline.status());
630 
631  logfileWrite(headerslog, &magic, sizeof(magic));
632  logfileWrite(headerslog, &M, sizeof(M));
633  logfileWrite(headerslog, &S, sizeof(S));
634  logfileWrite(headerslog, hmask, sizeof(HttpHeaderMask));
635  logfileWrite(headerslog, &ccmask, sizeof(int));
636 }
637 
638 #endif
639 
representation of a custom log directive.
Definition: CustomLog.h:22
int16_t rotateCount
How many log files to retain when rotating. Default: obey logfile_rotate.
Definition: CustomLog.h:36
static struct sockaddr_in mcast_miss_to
Definition: access_log.cc:49
void accessLogLogTo(CustomLog *log, AccessLogEntry::Pointer &al, ACLChecklist *checklist)
Definition: access_log.cc:74
#define assert(EX)
Definition: assert.h:17
SQUIDCEXTERN void hash_first(hash_table *)
Definition: hash.cc:176
void HttpdCombined(const AccessLogEntryPointer &al, Logfile *logfile)
Log with Apache httpd combined format.
SQUIDCEXTERN void hashFreeMemory(hash_table *)
Definition: hash.cc:272
Token * format
Definition: Format.h:60
void SquidCustom(const AccessLogEntryPointer &al, CustomLog *log)
Log with a local custom format.
bool hasAdaptToken
Definition: Config.h:34
void startPeerClock()
Start recording total time spent communicating with peers.
Definition: access_log.cc:296
HttpHdrCc * cache_control
Definition: Message.h:76
void accessLogClose(void)
Definition: access_log.cc:202
Definition: File.h:38
Token * next
Definition: Token.h:67
int mcastSetTtl(int fd, int mcast_ttl)
Definition: multicast.cc:20
Comm::ConnectionPointer tcpServer
TCP/IP level details of the last peer/server connection.
#define xcalloc
Definition: membanger.c:57
void log(char *format,...)
int i
Definition: membanger.c:49
#define xstrdup
int comm_open(int sock_type, int proto, Ip::Address &addr, int flags, const char *note)
Definition: comm.cc:222
unsigned short port
Definition: SquidConfig.h:226
bool totalResponseTime(struct timeval &responseTime)
Definition: access_log.cc:344
HttpHeaderMask mask
Definition: HttpHeader.h:157
char * name
Definition: CachePeer.h:40
SQUIDCEXTERN void hash_join(hash_table *, hash_link *)
Definition: hash.cc:132
bool hasIcapToken
Definition: Config.h:38
static void mcast_encode(unsigned int *, size_t, const unsigned int *)
Definition: access_log.cc:554
void OBJH(StoreEntry *)
Definition: forward.h:44
void FREE(void *)
Definition: forward.h:36
struct timeval current_time
Definition: stub_time.cc:15
struct timeval peer_select_start
int comm_udp_sendto(int fd, const Ip::Address &to_addr, const void *buf, int len)
Definition: comm.cc:927
static Notes metaHeaders
The list of configured meta headers.
Definition: Config.h:58
void logfileLineEnd(Logfile *lf)
Definition: File.cc:140
char host[SQUIDHOSTNAMELEN]
Log::Format::log_type type
Definition: CustomLog.h:30
Logfile * logfileOpen(const char *path, size_t bufsz, int fatal_flag)
Definition: File.cc:38
Logfile * logfile
Definition: CustomLog.h:28
int32_t mask
Definition: HttpHdrCc.h:173
int64_t bodyBytesRead
number of body bytes received from the next hop or -1
void fatalf(const char *fmt,...)
Definition: fatal.cc:79
void SquidNative(const AccessLogEntryPointer &al, Logfile *logfile)
Native Squid Format Display.
size_t bufferSize
how much to buffer before dropping or dying (access_log buffer-size)
Definition: CustomLog.h:32
void fvdbCountVia(const char *key)
void SquidReferer(const AccessLogEntryPointer &al, Logfile *logfile)
Display log details in Squid old refererlog format.
void const char HLPCB void * data
Definition: stub_helper.cc:16
#define debugs(SECTION, LEVEL, CONTENT)
Definition: Debug.h:123
void SquidIcap(const AccessLogEntryPointer &al, Logfile *logfile)
Display log details in Squid ICAP format.
#define DBG_IMPORTANT
Definition: Debug.h:45
void RegisterAction(char const *action, char const *desc, OBJH *handler, int pw_req_flag, int atomic)
Definition: Registration.cc:16
void logfileWrite(Logfile *lf, char *buf, size_t len)
Definition: File.cc:106
struct SquidConfig::@103 Log
CustomLog * next
Definition: CustomLog.h:29
ACLList * aclList
Definition: CustomLog.h:26
static hash_table * hash
Definition: text_backend.cc:41
SQUIDCEXTERN hash_link * hash_lookup(hash_table *, const void *)
Definition: hash.cc:147
void logfileClose(Logfile *lf)
Definition: File.cc:90
static void accessLogRegisterWithCacheManager(void)
Definition: access_log.cc:357
struct timeval peer_last_write_
time of the last write to the last peer
char * xstrncpy(char *dst, const char *src, size_t n)
Definition: xstring.cc:37
void fatal(const char *message)
Definition: fatal.cc:39
char HttpHeaderMask[12]
Ip::Address udp_incoming
Definition: SquidConfig.h:231
bool allowed() const
Definition: Acl.h:141
SQUIDCEXTERN hash_table * hash_create(HASHCMP *, int, HASHHASH *)
Definition: hash.cc:109
SQUIDCEXTERN void hashFreeItems(hash_table *, HASHFREE *)
Definition: hash.cc:256
struct timeval totalResponseTime_
cumulative for all peers
Http::StatusLine sline
Definition: HttpReply.h:60
SQUIDCEXTERN const char * hashKeyStr(hash_link *)
Definition: hash.cc:317
void clearPeerNotes()
forget previous notePeerRead() and notePeerWrite() calls (if any)
Definition: access_log.cc:272
char * filename
Definition: CustomLog.h:25
void accessLogRotate(void)
Definition: access_log.cc:179
CachePeer * getPeer() const
Definition: Connection.cc:97
unsigned char code
Definition: html_quote.c:20
static int mcast_miss_fd
Definition: access_log.cc:47
bool empty() const
Definition: Notes.h:138
struct SquidConfig::@107 Addrs
HttpHeader header
Definition: Message.h:74
void resetPeerNotes(const Comm::ConnectionPointer &server, const char *requestedHost)
Definition: access_log.cc:250
void stopPeerClock(const bool force)
Definition: access_log.cc:303
SQUIDCEXTERN hash_link * hash_next(hash_table *)
Definition: hash.cc:192
bool SIGHDLR int STUB void int
Definition: stub_tools.cc:68
HASHHASH * hash
Definition: hash.h:27
#define LOG_DISABLE
Definition: defines.h:100
void tvSub(struct timeval &res, struct timeval const &t1, struct timeval const &t2)
Definition: time.cc:41
char cd_host[SQUIDHOSTNAMELEN]
struct timeval store_complete_stop
CustomLog * accesslogs
Definition: SquidConfig.h:176
#define LOG_ENABLE
Definition: defines.h:99
allow_t const & fastCheck()
Definition: Checklist.cc:336
timeval firstConnStart_
first connection use among all peers
void accessLogLog(AccessLogEntry::Pointer &al, ACLChecklist *checklist)
Definition: access_log.cc:144
struct SquidConfig::@119 mcast_miss
static char server[MAXLINE]
Format::Format * logFormat
Definition: CustomLog.h:27
void SquidUserAgent(const AccessLogEntryPointer &al, Logfile *logfile)
Display log details in useragent format.
#define SQUIDHOSTNAMELEN
Definition: rfc2181.h:30
Ip::Address addr
Definition: SquidConfig.h:458
void accessLogInit(void)
Definition: access_log.cc:365
hier_code peerType
Definition: Connection.h:141
bool peerResponseTime(struct timeval &responseTime)
Definition: access_log.cc:317
void logfileRotate(Logfile *lf, int16_t rotateCount)
Definition: File.cc:99
int rotateNumber
Definition: SquidConfig.h:180
#define COMM_NONBLOCKING
Definition: Connection.h:44
SQUIDCEXTERN HASHHASH hash4
Definition: hash.h:46
int LogfileStatus
Definition: access_log.cc:71
void logfileLineStart(Logfile *lf)
Definition: File.cc:134
bool fatal
whether unrecoverable errors (e.g., dropping a log record) kill worker
Definition: CustomLog.h:34
char * encode_key
Definition: SquidConfig.h:461
#define xfree
const SBuf Dash
LogConfig TheConfig
Definition: Config.cc:15
void storeAppendPrintf(StoreEntry *e, const char *fmt,...)
Definition: store.cc:904
class SquidConfig Config
Definition: SquidConfig.cc:12
#define NULL
Definition: types.h:166
struct timeval peer_last_read_
time of the last read from the last peer
int HASHCMP(const void *, const void *)
Definition: hash.h:13
void HttpdCommon(const AccessLogEntryPointer &al, Logfile *logfile)
Log with Apache httpd common format.
const char * dash_str
Http::StatusCode status() const
retrieve the status code for this status line
Definition: StatusLine.h:45
void fvdbCountForw(const char *key)

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors