Wormhole connection
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user