You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
733 B
C++
38 lines
733 B
C++
// FileLog.h: interface for the CFileLog class.
|
|
//
|
|
//////////////////////////////////////////////////////////////////////
|
|
#pragma once
|
|
|
|
#include <string>
|
|
#include <memory>
|
|
|
|
#include "spdlog/spdlog.h"
|
|
|
|
class CFileLog
|
|
{
|
|
public:
|
|
CFileLog(const std::string& strName = R"(file_logger)");
|
|
virtual ~CFileLog();
|
|
|
|
void InitLogger();
|
|
|
|
void SetFilename(const std::string& csFilename);
|
|
void LogData(const std::string& csData);
|
|
|
|
private:
|
|
//
|
|
|
|
/////
|
|
// Variables
|
|
////
|
|
std::string m_strName;
|
|
std::string m_strFilename;
|
|
std::string m_strFolderName;
|
|
std::string m_strFileExt;
|
|
std::string m_strPathFilename;
|
|
|
|
bool m_bLogDailyFormat{ false };
|
|
|
|
std::shared_ptr<spdlog::logger> m_logger;
|
|
};
|