From b2416925f8845b70ed25fb4ec7cde8ef11e8c239 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Thu, 21 Aug 2025 20:39:52 +0100 Subject: Initial commit; basic Apache log parsing --- src/ingestor.hpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/ingestor.hpp (limited to 'src/ingestor.hpp') diff --git a/src/ingestor.hpp b/src/ingestor.hpp new file mode 100644 index 0000000..97ce9f9 --- /dev/null +++ b/src/ingestor.hpp @@ -0,0 +1,23 @@ +#pragma once + +#include "logTypes.hpp" +#include +#include + +namespace WebStat { + class Ingestor { + public: + using ScanResult = decltype(scn::scan(std::declval(), "")); + + [[nodiscard]] static ScanResult scanLogLine(std::string_view); + + void ingestLog(std::FILE *); + + protected: + size_t linesRead = 0; + size_t linesParsed = 0; + size_t linesDiscarded = 0; + }; +} -- cgit v1.2.3