Skip to content
Snippets Groups Projects
Commit d0adbe77 authored by jonymt's avatar jonymt
Browse files

[*] added creation dir for cmd log

parent 6345897c
No related branches found
No related tags found
1 merge request!11Cellframe clone
......@@ -22,11 +22,13 @@ win32 {
VERSION = $${VER_MAJ}.$${VER_MIN}.$$VER_PAT
DEFINES += CLI_PATH=\\\"./kelvin-node-cli.exe\\\"
DEFINES += LOG_FILE=\\\"./opt/cellframe-node/var/log/cellframe-node_logs.txt\\\"
DEFINES += CMD_LOG=\\\"./opt/cellframe-dashboard/data/cellframe-cmd_log.txt\\\"
}
else {
VERSION = $$VER_MAJ\.$$VER_MIN\-$$VER_PAT
DEFINES += CLI_PATH=\\\"/opt/cellframe-node/bin/cellframe-node-cli\\\"
DEFINES += LOG_FILE=\\\"/opt/cellframe-node/var/log/cellframe-node_logs.txt\\\"
DEFINES += CMD_LOG=\\\"/opt/cellframe-dashboard/data/cellframe-cmd_log.txt\\\"
}
# The following define makes your compiler emit warnings if you use
......
......@@ -4,7 +4,8 @@
DapChainConsoleHandler::DapChainConsoleHandler(QObject *parent) : QObject(parent)
{
m_File = new QFile("cmd_log.txt", this);
QDir().mkpath(QFileInfo(CMD_LOG).path());
m_File = new QFile(CMD_LOG, this);
m_File->open(QIODevice::Append | QIODevice::ReadWrite);
}
......
......@@ -5,6 +5,7 @@
#include <QProcess>
#include <QDebug>
#include <QFile>
#include <QDir>
class DapChainConsoleHandler : public QObject
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment