]> git.ipfire.org Git - thirdparty/squid.git/blob - src/log/CustomLog.h
Source Format Enforcement (#763)
[thirdparty/squid.git] / src / log / CustomLog.h
1 /*
2 * Copyright (C) 1996-2021 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 #ifndef SQUID_CUSTOMLOG_H_
10 #define SQUID_CUSTOMLOG_H_
11
12 #include "acl/forward.h"
13 #include "log/Formats.h"
14
15 class Logfile;
16 namespace Format
17 {
18 class Format;
19 }
20
21 /// representation of a custom log directive.
22 class CustomLog
23 {
24 public:
25 /// \returns whether the daemon module is used for this log
26 bool usesDaemon() const;
27
28 char *filename;
29 ACLList *aclList;
30 Format::Format *logFormat;
31 Logfile *logfile;
32 CustomLog *next;
33 Log::Format::log_type type;
34 /// how much to buffer before dropping or dying (access_log buffer-size)
35 size_t bufferSize;
36 /// whether unrecoverable errors (e.g., dropping a log record) kill worker
37 bool fatal;
38 /// How many log files to retain when rotating. Default: obey logfile_rotate
39 int16_t rotateCount;
40 };
41
42 #endif /* SQUID_CUSTOMLOG_H_ */
43