mirror-chatterino2/src/singletons/Logging.hpp

30 lines
529 B
C++
Raw Normal View History

#pragma once
2018-07-07 11:41:01 +02:00
#include "common/Singleton.hpp"
2018-06-26 14:09:39 +02:00
#include "messages/Message.hpp"
#include "singletons/helper/LoggingChannel.hpp"
#include <memory>
namespace chatterino {
2018-06-26 16:37:59 +02:00
2018-06-28 19:51:07 +02:00
class Paths;
2018-07-07 11:41:01 +02:00
class Logging : public Singleton
{
2018-06-28 19:51:07 +02:00
Paths *pathManager = nullptr;
public:
2018-06-28 19:51:07 +02:00
Logging() = default;
2018-07-07 11:41:01 +02:00
virtual void initialize(Application &app) override;
void addMessage(const QString &channelName, MessagePtr message);
private:
2018-07-06 19:23:47 +02:00
std::map<QString, std::unique_ptr<LoggingChannel>> loggingChannels_;
};
} // namespace chatterino