#pragma once
#include <string>
#include <fstream>

class Logger
{
public:
    Logger(std::string loggerFile);

    // 单例设计模式，禁止复制
    Logger(const Logger&) = delete;
    Logger& operator=(const Logger&) = delete;
    ~Logger() = default;

    void start();
    void PutLog(std::string module, std::string text);
    void end();

private:
    std::string loggerFile;
    std::fstream fs;
    bool debugFlag = false;
};