FormatSquidCustom.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 - Squid Custom format */
10 
11 #include "squid.h"
12 #include "AccessLogEntry.h"
13 #include "format/Format.h"
14 #include "log/CustomLog.h"
15 #include "log/File.h"
16 #include "log/Formats.h"
17 #include "MemBuf.h"
18 
19 void
21 {
22  static MemBuf mb;
23  mb.reset();
24 
25  // XXX: because we do not yet have a neutral form of transaction slab. use AccessLogEntry
26  log->logFormat->assemble(mb, al, log->logfile->sequence_number);
27 
28  logfilePrintf(log->logfile, "%s\n", mb.buf);
29 }
30 
representation of a custom log directive.
Definition: CustomLog.h:22
void SquidCustom(const AccessLogEntryPointer &al, CustomLog *log)
Log with a local custom format.
void logfilePrintf(Logfile *lf, const char *fmt,...)
Definition: File.cc:112
void log(char *format,...)
int64_t sequence_number
Unique sequence number per log line.
Definition: File.h:52
Logfile * logfile
Definition: CustomLog.h:28
void reset()
Definition: MemBuf.cc:141
char * buf
Definition: MemBuf.h:134
Format::Format * logFormat
Definition: CustomLog.h:27
void assemble(MemBuf &mb, const AccessLogEntryPointer &al, int logSequenceNumber) const
assemble the state information into a formatted line.
Definition: Format.cc:367
Definition: MemBuf.h:23

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors