]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Renamed customlog to CustomLog and moved to own header and implementation file in...
authorFrancesco Chemolli <kinkie@squid-cache.org>
Thu, 6 Sep 2012 12:47:15 +0000 (14:47 +0200)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Thu, 6 Sep 2012 12:47:15 +0000 (14:47 +0200)
src/AccessLogEntry.h
src/SquidConfig.h
src/adaptation/icap/icap_log.cc
src/cache_cf.cc
src/log/CustomLog.cc [new file with mode: 0644]
src/log/CustomLog.h [new file with mode: 0644]
src/log/FormatSquidCustom.cc
src/log/Formats.h
src/log/Makefile.am
src/log/access_log.cc
src/structs.h

index de15185d11e2419f69341c1f9c0b294a57c116b1..022ecac34d2729f8a5029e5a118e9f4dbde770a7 100644 (file)
@@ -275,7 +275,7 @@ class ACLChecklist;
 class StoreEntry;
 
 /* Should be in 'AccessLog.h' as the driver */
-extern void accessLogLogTo(customlog* log, AccessLogEntry::Pointer &al, ACLChecklist* checklist = NULL);
+extern void accessLogLogTo(CustomLog* log, AccessLogEntry::Pointer &al, ACLChecklist* checklist = NULL);
 extern void accessLogLog(AccessLogEntry::Pointer &, ACLChecklist * checklist);
 extern void accessLogRotate(void);
 extern void accessLogClose(void);
index d2daaf97a1ec92b76db364faeb9c9c5d5ef7183f..1e2fb338359a8491f299eaf34ea67f7c1b4e5ff1 100644 (file)
@@ -174,9 +174,9 @@ public:
     struct {
         char *store;
         char *swap;
-        customlog *accesslogs;
+        CustomLog *accesslogs;
 #if ICAP_CLIENT
-        customlog *icaplogs;
+        CustomLog *icaplogs;
 #endif
         int rotateNumber;
     } Log;
index 9231a47af791a29c4a982292b9128d9f6575961a..0da66d9ee089f7e50e45a0cacfa0bb54f64fddea 100644 (file)
@@ -10,7 +10,7 @@ int IcapLogfileStatus = LOG_DISABLE;
 void
 icapLogOpen()
 {
-    customlog *log;
+    CustomLog *log;
 
     for (log = Config.Log.icaplogs; log; log = log->next) {
         if (log->type == Log::Format::CLF_NONE)
@@ -25,7 +25,7 @@ icapLogOpen()
 void
 icapLogClose()
 {
-    customlog *log;
+    CustomLog *log;
 
     for (log = Config.Log.icaplogs; log; log = log->next) {
         if (log->logfile) {
@@ -38,7 +38,7 @@ icapLogClose()
 void
 icapLogRotate()
 {
-    for (customlog* log = Config.Log.icaplogs; log; log = log->next) {
+    for (CustomLog* log = Config.Log.icaplogs; log; log = log->next) {
         if (log->logfile) {
             logfileRotate(log->logfile);
         }
index d2b9617394295bbda5c7a4a6da4faa1bb69b66be..ca61ea3d43673273c9d7c9c918e4f446b555bb36 100644 (file)
@@ -173,10 +173,10 @@ static const char *const B_GBYTES_STR = "GB";
 
 static const char *const list_sep = ", \t\n\r";
 
-static void parse_access_log(customlog ** customlog_definitions);
-static int check_null_access_log(customlog *customlog_definitions);
-static void dump_access_log(StoreEntry * entry, const char *name, customlog * definitions);
-static void free_access_log(customlog ** definitions);
+static void parse_access_log(CustomLog ** customlog_definitions);
+static int check_null_access_log(CustomLog *customlog_definitions);
+static void dump_access_log(StoreEntry * entry, const char *name, CustomLog * definitions);
+static void free_access_log(CustomLog ** definitions);
 
 static void update_maxobjsize(void);
 static void configDoConfigure(void);
@@ -3974,11 +3974,11 @@ strtokFile(void)
 #include "AccessLogEntry.h"
 
 static void
-parse_access_log(customlog ** logs)
+parse_access_log(CustomLog ** logs)
 {
     const char *filename, *logdef_name;
 
-    customlog *cl = (customlog *)xcalloc(1, sizeof(*cl));
+    CustomLog *cl = (CustomLog *)xcalloc(1, sizeof(*cl));
 
     if ((filename = strtok(NULL, w_space)) == NULL) {
         self_destruct();
@@ -4048,15 +4048,15 @@ parse_access_log(customlog ** logs)
 }
 
 static int
-check_null_access_log(customlog *customlog_definitions)
+check_null_access_log(CustomLog *customlog_definitions)
 {
     return customlog_definitions == NULL;
 }
 
 static void
-dump_access_log(StoreEntry * entry, const char *name, customlog * logs)
+dump_access_log(StoreEntry * entry, const char *name, CustomLog * logs)
 {
-    customlog *log;
+    CustomLog *log;
 
     for (log = logs; log; log = log->next) {
         storeAppendPrintf(entry, "%s ", name);
@@ -4108,10 +4108,10 @@ dump_access_log(StoreEntry * entry, const char *name, customlog * logs)
 }
 
 static void
-free_access_log(customlog ** definitions)
+free_access_log(CustomLog ** definitions)
 {
     while (*definitions) {
-        customlog *log = *definitions;
+        CustomLog *log = *definitions;
         *definitions = log->next;
 
         log->logFormat = NULL;
diff --git a/src/log/CustomLog.cc b/src/log/CustomLog.cc
new file mode 100644 (file)
index 0000000..22be682
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * SQUID Web Proxy Cache          http://www.squid-cache.org/
+ * ----------------------------------------------------------
+ *
+ *  Squid is the result of efforts by numerous individuals from
+ *  the Internet community; see the CONTRIBUTORS file for full
+ *  details.   Many organizations have provided support for Squid's
+ *  development; see the SPONSORS file for full details.  Squid is
+ *  Copyrighted (C) 2001 by the Regents of the University of
+ *  California; see the COPYRIGHT file for full details.  Squid
+ *  incorporates software developed and/or copyrighted by other
+ *  sources; see the CREDITS file for full details.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
+ *
+ */
+#include "squid.h"
+#include "CustomLog.h"
+
diff --git a/src/log/CustomLog.h b/src/log/CustomLog.h
new file mode 100644 (file)
index 0000000..05519db
--- /dev/null
@@ -0,0 +1,35 @@
+#ifndef SQUID_CUSTOMLOG_H_
+#define SQUID_CUSTOMLOG_H_
+/*
+ * SQUID Web Proxy Cache          http://www.squid-cache.org/
+ * ----------------------------------------------------------
+ *
+ *  Squid is the result of efforts by numerous individuals from
+ *  the Internet community; see the CONTRIBUTORS file for full
+ *  details.   Many organizations have provided support for Squid's
+ *  development; see the SPONSORS file for full details.  Squid is
+ *  Copyrighted (C) 2001 by the Regents of the University of
+ *  California; see the COPYRIGHT file for full details.  Squid
+ *  incorporates software developed and/or copyrighted by other
+ *  sources; see the CREDITS file for full details.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
+ *
+ */
+
+class CustomLog_ {
+};
+
+#endif /* SQUID_CUSTOMLOG_H_ */
index 7fb2a45970ab3518d483fe8d5cd85ce2faff215b..cefffa39eaa4c278121a34bc446005b733ccd1c0 100644 (file)
@@ -37,7 +37,7 @@
 #include "MemBuf.h"
 
 void
-Log::Format::SquidCustom(const AccessLogEntry::Pointer &al, customlog * log)
+Log::Format::SquidCustom(const AccessLogEntry::Pointer &al, CustomLog * log)
 {
     static MemBuf mb;
     mb.reset();
index 8d60a086222fbe290f620142e9d4b2af5fac2f25..9ca1c324dac92a1aef12e13790ce0d5c87332464 100644 (file)
@@ -40,7 +40,7 @@ void SquidUserAgent(const AccessLogEntryPointer &al, Logfile * logfile);
 void SquidReferer(const AccessLogEntryPointer &al, Logfile * logfile);
 
 /// Log with a local custom format
-void SquidCustom(const AccessLogEntryPointer &al, customlog * log);
+void SquidCustom(const AccessLogEntryPointer &al, CustomLog * log);
 
 /// Log with Apache httpd common format
 void HttpdCommon(const AccessLogEntryPointer &al, Logfile * logfile);
index 5018962d7484c445e993645244e9b502be4dd87f..93c49d009c690711f90deffa9e47f778b2493d67 100644 (file)
@@ -27,5 +27,7 @@ liblog_la_SOURCES = \
        ModTcp.cc \
        ModTcp.h \
        ModUdp.cc \
-       ModUdp.h
+       ModUdp.h \
+       CustomLog.h \
+       CustomLog.cc
 
index 019c3ca2a611c9e8278d0a5e2e7d37cf5c4699f4..8b724b1539a20568d74a67bb7008a3e5fbb15083 100644 (file)
@@ -90,7 +90,7 @@ static void fvdbRegisterWithCacheManager();
 int LogfileStatus = LOG_DISABLE;
 
 void
-accessLogLogTo(customlog* log, AccessLogEntry::Pointer &al, ACLChecklist * checklist)
+accessLogLogTo(CustomLog* log, AccessLogEntry::Pointer &al, ACLChecklist * checklist)
 {
 
     if (al->url == NULL)
@@ -203,7 +203,7 @@ accessLogLog(AccessLogEntry::Pointer &al, ACLChecklist * checklist)
 void
 accessLogRotate(void)
 {
-    customlog *log;
+    CustomLog *log;
 #if USE_FORW_VIA_DB
 
     fvdbClear();
@@ -225,7 +225,7 @@ accessLogRotate(void)
 void
 accessLogClose(void)
 {
-    customlog *log;
+    CustomLog *log;
 
     for (log = Config.Log.accesslogs; log; log = log->next) {
         if (log->logfile) {
@@ -300,7 +300,7 @@ accessLogRegisterWithCacheManager(void)
 void
 accessLogInit(void)
 {
-    customlog *log;
+    CustomLog *log;
 
     accessLogRegisterWithCacheManager();
 
index f58422b0c83781128106eb43a6987bfdb5206394..af346fac8c76dbbadefffc784fc8f40ddacff64f 100644 (file)
@@ -103,7 +103,7 @@ class CpuAffinityMap;
 class RemovalPolicySettings;
 class external_acl;
 class Store;
-class customlog;
+class CustomLog;
 class cachemgr_passwd;
 class refresh_t;
 namespace AnyP
@@ -384,13 +384,13 @@ class Logfile;
 
 #include "format/Format.h"
 #include "log/Formats.h"
-class customlog {
+class CustomLog {
 public:
     char *filename;
     ACLList *aclList;
     Format::Format *logFormat;
     Logfile *logfile;
-    customlog *next;
+    CustomLog *next;
     Log::Format::log_type type;
 };