Wormhole connection

This commit is contained in:
Aditya Kulkarni
2019-02-06 12:56:58 -08:00
parent 0e997eedf4
commit 445c2845da
5 changed files with 137 additions and 12 deletions

View File

@@ -2,11 +2,13 @@
Logger::Logger(QObject *parent, QString fileName) : QObject(parent) {
m_showDate = true;
if (!fileName.isEmpty()) {
file = new QFile;
file->setFileName(fileName);
file->open(QIODevice::Append | QIODevice::Text);
}
write("=========Startup==========");
}
@@ -14,7 +16,7 @@ void Logger::write(const QString &value) {
if (!file)
return;
QString text = value;// + "";
QString text = value;
text = QDateTime::currentDateTime().toString("dd.MM.yyyy hh:mm:ss ") + text;
QTextStream out(file);
out.setCodec("UTF-8");