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