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>
27 lines
640 B
C++
27 lines
640 B
C++
#pragma once
|
|
|
|
#include "imgui.h"
|
|
|
|
#include <string>
|
|
|
|
namespace dragonx {
|
|
namespace ui {
|
|
|
|
struct ConsoleOutputFilter {
|
|
std::string text;
|
|
bool daemonMessagesEnabled = true;
|
|
bool errorsOnly = false;
|
|
bool rpcTraceEnabled = false;
|
|
bool appMessagesEnabled = true; // "[app] ..." wallet log lines (matched by prefix, not color)
|
|
ImU32 daemonColor = 0;
|
|
ImU32 errorColor = 0;
|
|
ImU32 rpcTraceColor = 0;
|
|
};
|
|
|
|
bool consoleLinePassesFilter(const std::string& lineText,
|
|
ImU32 lineColor,
|
|
const ConsoleOutputFilter& filter);
|
|
|
|
} // namespace ui
|
|
} // namespace dragonx
|