#pragma once #include "common/Singleton.hpp" #include "util/QStringHash.hpp" #include "util/ThreadGuard.hpp" #include #include #include #include namespace chatterino { class Paths; struct Message; using MessagePtr = std::shared_ptr; class LoggingChannel; class Logging : public Singleton { Paths *pathManager = nullptr; public: Logging() = default; virtual void initialize(Settings &settings, Paths &paths) override; void addMessage(const QString &channelName, MessagePtr message, const QString &platformName); private: using PlatformName = QString; using ChannelName = QString; std::map>> loggingChannels_; // Keeps the value of the `loggedChannels` settings std::unordered_set onlyLogListedChannels; ThreadGuard threadGuard; }; } // namespace chatterino