bbadbc4b33
Co-authored-by: xHeaveny <69117321+xHeaveny@users.noreply.github.com> Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
35 lines
710 B
C++
35 lines
710 B
C++
#pragma once
|
|
|
|
#include "common/Singleton.hpp"
|
|
|
|
#include "messages/Message.hpp"
|
|
#include "singletons/helper/LoggingChannel.hpp"
|
|
|
|
#include <memory>
|
|
|
|
namespace chatterino {
|
|
|
|
class Paths;
|
|
|
|
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<PlatformName,
|
|
std::map<ChannelName, std::unique_ptr<LoggingChannel>>>
|
|
loggingChannels_;
|
|
};
|
|
|
|
} // namespace chatterino
|