]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/log/CustomLog.h
Source Format Enforcement (#1234)
[thirdparty/squid.git] / src / log / CustomLog.h
index f93a2ce66d13ba403d87388af41e27cf0ff436ed..3621e13f9270623517152294df2208153870fae8 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
  *
  * Squid software is distributed under GPLv2+ license and includes
  * contributions from numerous individuals and organizations.
@@ -9,30 +9,16 @@
 #ifndef SQUID_CUSTOMLOG_H_
 #define SQUID_CUSTOMLOG_H_
 
-//#include "format/Format.h"
-#include "acl/forward.h"
-#include "log/Formats.h"
+#include "log/FormattedLog.h"
 
-class Logfile;
-namespace Format
-{
-class Format;
-}
-
-/// representaiton of a custom log directive. Currently a POD.
-class CustomLog
+// TODO: Replace with std::list<FormattedLog> or its wrapper.
+/// all same-directive transaction logging rules
+/// (e.g., all access_log rules or all icap_log rules)
+class CustomLog: public FormattedLog
 {
 public:
-    char *filename;
-    ACLList *aclList;
-    Format::Format *logFormat;
-    Logfile *logfile;
-    CustomLog *next;
-    Log::Format::log_type type;
-    /// how much to buffer before dropping or dying (access_log buffer-size)
-    size_t bufferSize;
-    /// whether unrecoverable errors (e.g., dropping a log record) kill worker
-    bool fatal;
+    /// next _log line (if any); maintained by cache_cf.cc
+    CustomLog *next = nullptr;
 };
 
 #endif /* SQUID_CUSTOMLOG_H_ */