equal
deleted
inserted
replaced
258 directory.mkdir("logs"); |
258 directory.mkdir("logs"); |
259 } |
259 } |
260 |
260 |
261 static QFile file(NM_LOG_DIRECTORY + |
261 static QFile file(NM_LOG_DIRECTORY + |
262 QString("nmail_timestamps.log")); |
262 QString("nmail_timestamps.log")); |
263 if (NM_LOG_TO_FILE && !file.isOpen()) { |
263 if (NM_LOG_TO_FILE && !file.isOpen()) { |
264 file.open(QIODevice::Append | QIODevice::Text | QIODevice::ReadWrite); |
264 file.open(QIODevice::Append | QIODevice::Text | QIODevice::ReadWrite); |
265 } |
265 } |
266 if (file.isWritable()) { |
266 if (file.isWritable()) { |
267 QTextStream(&file) << timestamp << '\n'; |
267 QTextStream(&file) << timestamp << '\n'; |
268 } else { |
268 } else { |
269 qDebug("[Nmail] %s",timestamp.toLatin1().data()); |
269 qDebug("[Nmail] %s",timestamp.toLatin1().data()); |
270 } |
270 } |
|
271 if(file.isOpen()) { |
|
272 file.close(); |
|
273 } |
271 } |
274 } |
272 |
275 |
273 #else |
276 #else |
274 |
277 |
275 #define NM_TIMESTAMP(msg) |
278 #define NM_TIMESTAMP(msg) |