]> git.ipfire.org Git - thirdparty/squid.git/blob - src/log/Config.cc
Moved cache_cf.cc prototypes to cache_cf.h
[thirdparty/squid.git] / src / log / Config.cc
1 #include "squid.h"
2 #include "cache_cf.h"
3 #include "log/Config.h"
4 #include "protos.h"
5
6 Log::LogConfig Log::TheConfig;
7
8 void
9 Log::LogConfig::parseFormats()
10 {
11 char *name, *def;
12
13 if ((name = strtok(NULL, w_space)) == NULL)
14 self_destruct();
15
16 if ((def = strtok(NULL, "\r\n")) == NULL) {
17 self_destruct();
18 return;
19 }
20
21 debugs(3, 2, "Log Format for '" << name << "' is '" << def << "'");
22
23 ::Format::Format *nlf = new ::Format::Format(name);
24
25 if (!nlf->parse(def)) {
26 self_destruct();
27 return;
28 }
29
30 // add to global config list
31 nlf->next = logformats;
32 logformats = nlf;
33 }