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

Method write

Telegram/SourceFiles/logs.cpp:111–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109 }
110
111 void write(LogDataType type, const QString &msg) {
112 QMutexLocker lock(_logsMutex(type));
113 WritingEntryScope scope;
114
115 if (type != LogDataMain) {
116 reopenDebug();
117 }
118 const auto file = files[type].get();
119 if (!file || !file->isOpen()) {
120 return;
121 }
122 file->write(msg.toUtf8());
123 file->flush();
124 }
125
126private:
127 std::unique_ptr<QFile> files[LogDataCount];

Callers 5

refresh.pyFile · 0.45
reopenMethod · 0.45
_logsWriteFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45

Calls 2

_logsMutexFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected