Skip to content

Commit 8f51ad1

Browse files
skerkerclaude
andcommitted
docs(logging): note the Info-rule asymmetry and the test's no-op save path (aethersdr#4588 review)
Comment-only. The applyFilterRules() comment now states that no blanket aether.*.info=false is emitted, so the seven QtDebugMsg/QtInfoMsg-declared categories keep their Info regardless of the toggle. The test's settings sandbox is kept as defense-in-depth and marked as an intentional no-op (AppSettings refuses to save before a successful load). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 4d3e770 commit 8f51ad1

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

src/core/LogManager.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,10 @@ void LogManager::applyFilterRules()
142142
// Most categories declare a QtWarningMsg threshold, which gates
143143
// Info as well as Debug — without an .info rule their qCInfo
144144
// lines can never emit under any runtime configuration (#4419).
145+
// Note the asymmetry: no blanket aether.*.info=false is emitted
146+
// (it would newly silence the QtDebugMsg/QtInfoMsg-declared
147+
// categories), so for those the toggle governs Debug only and
148+
// their Info stays visible regardless.
145149
rules << QString("%1.info=true").arg(c.id);
146150
}
147151
}

tests/log_manager_filter_rules_test.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ void captureHandler(QtMsgType type, const QMessageLogContext& ctx, const QString
4646

4747
int main(int argc, char** argv)
4848
{
49+
// Defense-in-depth only: the save path in setEnabled()/setAllEnabled() is
50+
// intentionally a no-op here — AppSettings refuses to save before a
51+
// successful load(), which this test never performs (the "refusing to
52+
// save" warnings in the output are expected). The sandbox guards against
53+
// that refusal ever changing.
4954
QTemporaryDir fakeHome(QDir::tempPath() + "/aether-logmanager-filter-test-XXXXXX");
5055
if (!fakeHome.isValid()) {
5156
std::printf("[FAIL] create temporary home\n");

0 commit comments

Comments
 (0)