mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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);
|
auto file = QFile(debugModeSettingPath);
|
||||||
if (file.exists() && file.open(QIODevice::ReadOnly)) {
|
if (file.exists() && file.open(QIODevice::ReadOnly)) {
|
||||||
Logs::SetDebugEnabled(file.read(1) != "0");
|
Logs::SetDebugEnabled(file.read(1) != "0");
|
||||||
|
#if defined _DEBUG
|
||||||
|
} else {
|
||||||
|
Logs::SetDebugEnabled(true);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
if (cDebugMode()) {
|
if (cDebugMode()) {
|
||||||
Logs::SetDebugEnabled(true);
|
Logs::SetDebugEnabled(true);
|
||||||
|
|
|
@ -335,11 +335,7 @@ void SetDebugEnabled(bool enabled) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DebugEnabled() {
|
bool DebugEnabled() {
|
||||||
#if defined _DEBUG
|
|
||||||
return true;
|
|
||||||
#else
|
|
||||||
return DebugModeEnabled;
|
return DebugModeEnabled;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool WritingEntry() {
|
bool WritingEntry() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue