mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-14 13:17:08 +02:00
Added ability to disable debug logs even for debug builds.
This commit is contained in:
parent
a9824fde91
commit
489c86dad8
2 changed files with 4 additions and 4 deletions
|
@ -106,6 +106,10 @@ void ComputeDebugMode() {
|
|||
auto file = QFile(debugModeSettingPath);
|
||||
if (file.exists() && file.open(QIODevice::ReadOnly)) {
|
||||
Logs::SetDebugEnabled(file.read(1) != "0");
|
||||
#if defined _DEBUG
|
||||
} else {
|
||||
Logs::SetDebugEnabled(true);
|
||||
#endif
|
||||
}
|
||||
if (cDebugMode()) {
|
||||
Logs::SetDebugEnabled(true);
|
||||
|
|
|
@ -335,11 +335,7 @@ void SetDebugEnabled(bool enabled) {
|
|||
}
|
||||
|
||||
bool DebugEnabled() {
|
||||
#if defined _DEBUG
|
||||
return true;
|
||||
#else
|
||||
return DebugModeEnabled;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool WritingEntry() {
|
||||
|
|
Loading…
Add table
Reference in a new issue