| 499 | } |
| 500 | |
| 501 | void writeMain(const QString &v) { |
| 502 | time_t t = time(NULL); |
| 503 | struct tm tm; |
| 504 | mylocaltime(&tm, &t); |
| 505 | |
| 506 | const auto msg = QString("[%1.%2.%3 %4:%5:%6] %7\n" |
| 507 | ).arg(tm.tm_year + 1900 |
| 508 | ).arg(tm.tm_mon + 1, 2, 10, QChar('0') |
| 509 | ).arg(tm.tm_mday, 2, 10, QChar('0') |
| 510 | ).arg(tm.tm_hour, 2, 10, QChar('0') |
| 511 | ).arg(tm.tm_min, 2, 10, QChar('0') |
| 512 | ).arg(tm.tm_sec, 2, 10, QChar('0') |
| 513 | ).arg(v); |
| 514 | _logsWrite(LogDataMain, msg); |
| 515 | |
| 516 | writeDebug(v); |
| 517 | } |
| 518 | |
| 519 | void writeDebug(const QString &v) { |
| 520 | const auto msg = QString("%1 %2\n").arg(_logsEntryStart(), v); |
no test coverage detected