MCPcopy Create free account
hub / github.com/TDesktop-x64/tdesktop / writeMain

Function writeMain

Telegram/SourceFiles/logs.cpp:501–517  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

499}
500
501void 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
519void writeDebug(const QString &v) {
520 const auto msg = QString("%1 %2\n").arg(_logsEntryStart(), v);

Callers 2

logMessageMethod · 0.85
logAssertionViolationMethod · 0.85

Calls 4

mylocaltimeFunction · 0.85
_logsWriteFunction · 0.85
writeDebugFunction · 0.85
QStringClass · 0.50

Tested by

no test coverage detected