feat(console): add an "App" toggle to show/hide [app] log lines
The console mixed RPC traces, daemon output, and the wallet's own "[app] ..." log lines with no way to hide the latter. Add an "App" checkbox alongside the existing Daemon/Errors/RPC toggles. Since [app] lines share COLOR_INFO with other info text, the filter matches them by their "[app] " prefix rather than by color. Default on; unit test + i18n added. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -2298,7 +2298,7 @@ void testRendererHelpers()
|
||||
EXPECT_FALSE(dragonx::ui::IsPoolMiningActive(true, false, true));
|
||||
EXPECT_TRUE(dragonx::ui::IsPoolMiningActive(false, false, true));
|
||||
|
||||
dragonx::ui::ConsoleOutputFilter filter{"error", false, false, false, 10, 20, 30};
|
||||
dragonx::ui::ConsoleOutputFilter filter{"error", false, false, false, true, 10, 20, 30};
|
||||
EXPECT_TRUE(dragonx::ui::consoleLinePassesFilter("RPC Error", 20, filter));
|
||||
EXPECT_FALSE(dragonx::ui::consoleLinePassesFilter("daemon line", 10, filter));
|
||||
filter.text.clear();
|
||||
@@ -2311,6 +2311,14 @@ void testRendererHelpers()
|
||||
EXPECT_TRUE(dragonx::ui::consoleLinePassesFilter("error line", 20, filter));
|
||||
EXPECT_FALSE(dragonx::ui::consoleLinePassesFilter("info line", 30, filter));
|
||||
|
||||
// "[app] ..." lines are filtered by prefix (they share the info color), not by color.
|
||||
filter.errorsOnly = false;
|
||||
filter.appMessagesEnabled = false;
|
||||
EXPECT_FALSE(dragonx::ui::consoleLinePassesFilter("[app] Price updated", 30, filter));
|
||||
EXPECT_TRUE(dragonx::ui::consoleLinePassesFilter("[rpc] trace", 30, filter));
|
||||
filter.appMessagesEnabled = true;
|
||||
EXPECT_TRUE(dragonx::ui::consoleLinePassesFilter("[app] Price updated", 30, filter));
|
||||
|
||||
std::vector<dragonx::AddressInfo> poolAddresses;
|
||||
poolAddresses.push_back({"R-transparent", 0.0, "transparent", true});
|
||||
poolAddresses.push_back({"zs-default-worker", 0.0, "shielded", true});
|
||||
|
||||
Reference in New Issue
Block a user