| 11 | #include "lazyfilesink.hpp" |
| 12 | |
| 13 | class Log { |
| 14 | private: |
| 15 | enum class InitStatus { |
| 16 | NotInitialized, |
| 17 | Initializing, |
| 18 | Initialized |
| 19 | }; |
| 20 | |
| 21 | static std::atomic<InitStatus> s_LogInitStatus; |
| 22 | static std::weak_ptr<lazy_file_sink_mt> s_LogSink; |
| 23 | |
| 24 | static std::time_t GetProcessCreationTime() noexcept; |
| 25 | static std::filesystem::path GetPath(const std::optional<std::filesystem::path> &storageFolder); |
| 26 | static void LogErrorHandler(const std::string &message); |
| 27 | |
| 28 | public: |
| 29 | PROGRAMLOG_API static bool IsInitialized() noexcept; |
| 30 | PROGRAMLOG_API static std::shared_ptr<lazy_file_sink_mt> GetSink() noexcept; |
| 31 | PROGRAMLOG_API static void Initialize(const std::optional<std::filesystem::path> &storageFolder); |
| 32 | }; |
no outgoing calls
no test coverage detected