]> git.ipfire.org Git - thirdparty/squid.git/blob - src/log/Config.h
SourceFormat Enforcement
[thirdparty/squid.git] / src / log / Config.h
1 /*
2 * Copyright (C) 1996-2015 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_SRC_LOG_CONFIG_H
10 #define SQUID_SRC_LOG_CONFIG_H
11
12 #include "format/Format.h"
13
14 class StoreEntry;
15
16 namespace Log
17 {
18
19 class LogConfig
20 {
21 public:
22 void parseFormats();
23 void dumpFormats(StoreEntry *e, const char *name) {
24 logformats->dump(e, name);
25 }
26
27 /// File path to logging daemon executable
28 char *logfile_daemon;
29
30 /// Linked list of custom log formats
31 ::Format::Format *logformats;
32
33 #if USE_ADAPTATION
34 bool hasAdaptToken;
35 #endif
36
37 #if ICAP_CLIENT
38 bool hasIcapToken;
39 #endif
40 };
41
42 extern LogConfig TheConfig;
43
44 } // namespace Log
45
46 // Legacy parsing wrappers
47 #define parse_logformat(X) (X)->parseFormats()
48 #define free_logformat(X) do{ delete (*X).logformats; (*X).logformats=NULL; }while(false)
49 #define dump_logformat(E,N,D) (D).dumpFormats((E),(N))
50
51 #endif
52