loghelper.cpp 553 B

123456789101112131415161718
  1. #include "loghelper.h"
  2. LogHelper::LogHelper()
  3. {
  4. }
  5. void LogHelper::writeLog(QString log)
  6. {
  7. // QString path = QCoreApplication::applicationDirPath()+"/../Log";
  8. // QFileInfo fileinfo(path + "/system.log");
  9. // if(fileinfo.size()>4096*1024)
  10. // QFile::remove(path + "/system.log");
  11. // QFile file(path + "/system.log");
  12. // if(!file.open(QIODevice::Append))
  13. // return ;
  14. // QTextStream out(&file);
  15. // out <<QDateTime::currentDateTime().toString("yyyy-MM-dd HH:mm:ss ") << log <<"\r\n";
  16. // file.close();
  17. }