mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-11 14:07:00 +03:00
Rolling 20210119
This commit is contained in:
@@ -12,8 +12,10 @@ ClassLogFile LogFile("/sdcard/log/message", "log_%Y-%m-%d.txt");
|
||||
|
||||
void ClassLogFile::WriteHeapInfo(std::string _id)
|
||||
{
|
||||
std::string _zw;
|
||||
_zw = "\t" + _id + "\t" + getESPHeapInfo();
|
||||
std::string _zw = "\t" + _id;
|
||||
if (loglevel > 0)
|
||||
_zw = _zw + "\t" + getESPHeapInfo();
|
||||
|
||||
WriteToFile(_zw);
|
||||
}
|
||||
|
||||
@@ -188,4 +190,5 @@ ClassLogFile::ClassLogFile(std::string _logroot, std::string _logfile)
|
||||
logfile = _logfile;
|
||||
doLogFile = true;
|
||||
retentionInDays = 10;
|
||||
loglevel = 0;
|
||||
}
|
||||
|
||||
@@ -9,11 +9,14 @@ private:
|
||||
std::string logfile;
|
||||
bool doLogFile;
|
||||
unsigned short retentionInDays;
|
||||
int loglevel;
|
||||
public:
|
||||
ClassLogFile(std::string _logpath, std::string _logfile);
|
||||
|
||||
std::string getESPHeapInfo();
|
||||
|
||||
void setLogLevel(int i){loglevel = i;};
|
||||
|
||||
void WriteHeapInfo(std::string _id);
|
||||
|
||||
void SwitchOnOff(bool _doLogFile);
|
||||
|
||||
Reference in New Issue
Block a user