Config.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2023 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#include "log/Formats.h"
14
15class StoreEntry;
16
17namespace Log
18{
19
21{
22public:
24 static const char *BuiltInFormatName(Format::log_type type);
25
27 static Format::log_type FindBuiltInFormat(const char *logformatName);
28 static_assert(!Log::Format::CLF_UNKNOWN, "FindBuiltInFormat(unknown) is falsy");
29
31 ::Format::Format *findCustomFormat(const char *logformatName) const;
32
35 bool knownFormat(const char *logformatName) const;
36
37 void parseFormats();
38 void dumpFormats(StoreEntry *e, const char *name) {
39 logformats->dump(e, name);
40 }
41
44
47
48#if USE_ADAPTATION
50#endif
51
52#if ICAP_CLIENT
54#endif
55};
56
57extern LogConfig TheConfig;
58
59} // namespace Log
60
61// Legacy parsing wrappers
62#define parse_logformat(X) (X)->parseFormats()
63#define free_logformat(X) do{ delete (*X).logformats; (*X).logformats=NULL; }while(false)
64#define dump_logformat(E,N,D) (D).dumpFormats((E),(N))
65
66#endif
67
void dump(StoreEntry *entry, const char *directiveName, bool eol=true) const
dump this whole list of formats into the provided StoreEntry
Definition: Format.cc:117
static const char * BuiltInFormatName(Format::log_type type)
Definition: Config.cc:18
bool knownFormat(const char *logformatName) const
Definition: Config.cc:98
static Format::log_type FindBuiltInFormat(const char *logformatName)
Definition: Config.cc:52
char * logfile_daemon
File path to logging daemon executable.
Definition: Config.h:43
void dumpFormats(StoreEntry *e, const char *name)
Definition: Config.h:38
void parseFormats()
Definition: Config.cc:104
bool hasIcapToken
Definition: Config.h:53
::Format::Format * findCustomFormat(const char *logformatName) const
Definition: Config.cc:87
bool hasAdaptToken
Definition: Config.h:49
::Format::Format * logformats
Linked list of custom log formats.
Definition: Config.h:46
@ CLF_UNKNOWN
Definition: Formats.h:27
Definition: Config.h:18
LogConfig TheConfig
Definition: Config.cc:15

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors