mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-08 12:36:52 +03:00
compatibitly mit esp-idf pure
This commit is contained in:
23
code/components/jomjol_logfile/ClassLogFile.h
Normal file
23
code/components/jomjol_logfile/ClassLogFile.h
Normal file
@@ -0,0 +1,23 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
|
||||
class ClassLogFile
|
||||
{
|
||||
private:
|
||||
std::string logroot;
|
||||
std::string logfile;
|
||||
bool doLogFile;
|
||||
unsigned short retentionInDays;
|
||||
public:
|
||||
ClassLogFile(std::string _logpath, std::string _logfile);
|
||||
|
||||
void SwitchOnOff(bool _doLogFile);
|
||||
void SetRetention(unsigned short _retentionInDays);
|
||||
|
||||
void WriteToFile(std::string info, bool _time = true);
|
||||
void WriteToDedicatedFile(std::string _fn, std::string info, bool _time = true);
|
||||
void RemoveOld();
|
||||
};
|
||||
|
||||
extern ClassLogFile LogFile;
|
||||
Reference in New Issue
Block a user