]> git.ipfire.org Git - thirdparty/squid.git/blob - src/log/FormatSquidCustom.cc
SourceFormat Enforcement
[thirdparty/squid.git] / src / log / FormatSquidCustom.cc
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
20 Log::Format::SquidCustom(const AccessLogEntry::Pointer &al, CustomLog * log)
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