2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-01 06:55:58 +00:00

Use LOG/DEBUG_LOG from lib_base.

This commit is contained in:
John Preston
2021-04-20 16:40:54 +04:00
parent 08e170a068
commit c360bb9da4
12 changed files with 65 additions and 87 deletions

View File

@@ -21,17 +21,20 @@ void BaseIntegration::enterFromEventLoop(FnMut<void()> &&method) {
std::move(method));
}
bool BaseIntegration::logSkipDebug() {
return !Logs::DebugEnabled() && Logs::started();
}
void BaseIntegration::logMessageDebug(const QString &message) {
Logs::writeDebug(message);
}
void BaseIntegration::logMessage(const QString &message) {
#ifdef DEBUG_LOG
DEBUG_LOG((message));
#endif // DEBUG_LOG
Logs::writeMain(message);
}
void BaseIntegration::logAssertionViolation(const QString &info) {
#ifdef LOG
LOG(("Assertion Failed! ") + info);
#endif // LOG
Logs::writeMain("Assertion Failed! " + info);
CrashReports::SetAnnotation("Assertion", info);
}