21 : _forceFlush(forceFlush)
26 time_t now = time(
nullptr);
27 std::string fileName = logDir +
"/" + std::to_string(now) +
"_log.txt";
28 _logFile.open(fileName, std::ofstream::out);
32 std::string msg =
"Could not create log file in dir: " + logDir;
void post(const std::string &message)
FileLog(std::string logDir, bool forceFlush)
Utils provides utilities for string & file handling, logging and math functions.
bool dirExists(const string &path)
Returns true if a directory exists.
bool makeDir(const string &path)
Creates a directory with given path.
void errorMsg(const char *tag, const char *msg, const int line, const char *file)
Platform independent error message output.