diff options
Diffstat (limited to '')
-rw-r--r-- | daemon/logger.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/daemon/logger.cpp b/daemon/logger.cpp index 56d1c3c..7222c95 100644 --- a/daemon/logger.cpp +++ b/daemon/logger.cpp @@ -14,6 +14,7 @@ #include <QDBusConnection> #include <QDateTime> #include <QFile> +#include <QDir> #include <QTextStream> #include <QStandardPaths> #include <QTimer> @@ -116,3 +117,8 @@ QStringList fileGetPrevRecord(QString sensorPrefix, QDateTime recordTime) { QString fileNameForDate(QDate date, QString prefix) { return QStandardPaths::writableLocation(QStandardPaths::HomeLocation) + "/asteroid-healthloggerd/" + prefix + "/" + date.toString("yyyy-MM-dd.log"); } + +void setupFilePath(QString sensorPrefix) { + QDir().mkpath(QStandardPaths::writableLocation(QStandardPaths::HomeLocation) + "/asteroid-healthloggerd/" + sensorPrefix); +} + |