6#include <QFileSystemWatcher>
42 void Start(
const std::filesystem::path& path,
43 std::unique_ptr<parser::IDataParser>
parser,
76 std::vector<std::pair<int, db::LogEvent::EventItems>>&& batch)
override
78 for (
auto& [
id, items] : batch)
Container class for managing collections of LogEvent objects.
Interface definitions for data parsing components.
High-performance, thread-safe container for managing large collections of LogEvent objects.
Definition EventsContainer.hpp:129
void AddEvent(LogEvent &&event)
Adds a new event to the container.
Definition EventsContainer.cpp:28
Represents a single, structured log event with key-value data.
Definition LogEvent.hpp:97
Observer interface for receiving notifications from data parsers.
Definition IDataParser.hpp:52
Definition FileTailer.hpp:33
const std::filesystem::path & FilePath() const
Definition FileTailer.hpp:49
void Start(const std::filesystem::path &path, std::unique_ptr< parser::IDataParser > parser, db::EventsContainer &events)
Definition FileTailer.cpp:30
uintmax_t m_lastOffset
Definition FileTailer.hpp:91
bool m_lineBased
Definition FileTailer.hpp:93
std::unique_ptr< parser::IDataParser > m_parser
Definition FileTailer.hpp:87
db::EventsContainer * m_events
Definition FileTailer.hpp:89
QFileSystemWatcher m_watcher
Definition FileTailer.hpp:86
~FileTailer() override=default
void Stop()
Definition FileTailer.cpp:77
void NewEventsAvailable(std::size_t count)
Emitted on the main thread after new events have been added.
void OnFileChanged(const QString &path)
Definition FileTailer.cpp:99
std::filesystem::path m_path
Definition FileTailer.hpp:90
bool m_active
Definition FileTailer.hpp:92
bool IsActive() const
Definition FileTailer.hpp:47
std::unique_ptr< TailObserver > m_observer
Definition FileTailer.hpp:88
void TailingError(const QString &message)
Emitted when a tailing read or parse error occurs.
Data parsing components and interfaces.
Definition IControler.hpp:22
Definition ConfigEditorDialog.cpp:19
Definition FileTailer.hpp:63
void ProgressUpdated() override
Called when parsing progress is updated.
Definition FileTailer.hpp:69
void NewEventFound(db::LogEvent &&ev) override
Called when a new event is discovered during parsing.
Definition FileTailer.hpp:70
TailObserver(db::EventsContainer &c)
Definition FileTailer.hpp:67
std::size_t added
Definition FileTailer.hpp:65
db::EventsContainer & container
Definition FileTailer.hpp:64
void NewEventBatchFound(std::vector< std::pair< int, db::LogEvent::EventItems > > &&batch) override
Called when a batch of new events is discovered during parsing.
Definition FileTailer.hpp:75