Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- #include <fstream>
- #include <string>
- #include <memory>
- #include <shared_mutex>
- enum class LogType
- {
- Info,
- Warning,
- Error,
- Debug
- };
- class CLog
- {
- public:
- void Initialize(const std::string& Path);
- void Write(const std::string& Text, LogType Type);
- private:
- std::string TypeToString(LogType Type);
- std::shared_timed_mutex WriteMutex;
- std::ofstream File;
- };
- extern std::unique_ptr<CLog> Log;
Advertisement
Add Comment
Please, Sign In to add comment