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.

31 lines
488 B
C++

#pragma once
#include <fstream>
#include <string>
#include <iostream>
#include <ctime>
#include <sstream>
#include <iomanip>
#include <chrono>
class LaserLogger
{
private:
LaserLogger();
~LaserLogger();
private:
static LaserLogger* m_instance;
private:
static std::ofstream logfile;
public:
void WriteLog(int level , std::string logStr);
public:
static LaserLogger* GetInstance()
{
if (m_instance == nullptr) {
m_instance = new LaserLogger();
}
return m_instance;
}
};