| 123456789101112131415161718 |
- #include "loghelper.h"
- LogHelper::LogHelper()
- {
- }
- void LogHelper::writeLog(QString log)
- {
- // QString path = QCoreApplication::applicationDirPath()+"/../Log";
- // QFileInfo fileinfo(path + "/system.log");
- // if(fileinfo.size()>4096*1024)
- // QFile::remove(path + "/system.log");
- // QFile file(path + "/system.log");
- // if(!file.open(QIODevice::Append))
- // return ;
- // QTextStream out(&file);
- // out <<QDateTime::currentDateTime().toString("yyyy-MM-dd HH:mm:ss ") << log <<"\r\n";
- // file.close();
- }
|