summaryrefslogtreecommitdiffstats
path: root/src/util/consoleLogger.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/consoleLogger.cpp')
-rwxr-xr-x[-rw-r--r--]src/util/consoleLogger.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/util/consoleLogger.cpp b/src/util/consoleLogger.cpp
index b523b40..9189543 100644..100755
--- a/src/util/consoleLogger.cpp
+++ b/src/util/consoleLogger.cpp
@@ -226,21 +226,17 @@ void ConsoleLogger::_prepareLog()
_logFileGood = false;
_readLog();
- mkdir(getPolicyFilePath(QString()).toUtf8().data(), 0777);
+ createPolicyDir();
QString fullpath;
fullpath.append(_logPath);
//TODO: handle wether path/ or path were entered?
fullpath.append(_logName);
_logFile.open(fullpath.toUtf8().data(), std::ofstream::out | std::ofstream::app);
if (_logFile.good())
- {
_logFileGood = true;
- writeTerminal(QString("LogPath/Name changed to: ").append(fullpath));
- }
else
- {
- printf("ERROR: Logfile ( %s ) not accessible/found. Logs will not be available.\n", _logPath.toUtf8().data());
- }
+ qDebug("ERROR: Logfile ( %s ) not accessible/found. Logs will not be available.", qPrintable(_logPath));
+
_logFile.close();
}