comparison base/Debug.cpp @ 956:d002827b5896

comment only
author Chris Cannam
date Wed, 03 Sep 2014 09:46:01 +0100
parents 4b9fc70a37d5
children e8e6c4e7437b
comparison
equal deleted inserted replaced
955:5cadfcec89bc 956:d002827b5896
43 QDir logdir(QString("%1/%2").arg(pfx).arg("log")); 43 QDir logdir(QString("%1/%2").arg(pfx).arg("log"));
44 44
45 if (!prefix) { 45 if (!prefix) {
46 prefix = new char[20]; 46 prefix = new char[20];
47 sprintf(prefix, "[%lu]", (unsigned long)QCoreApplication::applicationPid()); 47 sprintf(prefix, "[%lu]", (unsigned long)QCoreApplication::applicationPid());
48 //!!! what to do if mkpath fails?
48 if (!logdir.exists()) logdir.mkpath(logdir.path()); 49 if (!logdir.exists()) logdir.mkpath(logdir.path());
49 } 50 }
50 51
51 if (!debugs.hasLocalData()) { 52 if (!debugs.hasLocalData()) {
52 QFile *logFile = new QFile(logdir.path() + "/sv-debug.log"); 53 QFile *logFile = new QFile(logdir.path() + "/sv-debug.log");