mirror of
https://github.com/Xahau/xahaud.git
synced 2026-04-29 15:37:46 +00:00
Logs::setTransform(fn) installs a function that transforms every log
message before output. Useful in tests to replace raw r-addresses
with human-readable account names.
Usage:
env.app().logs().setTransform([&](std::string const& text) {
std::string out = text;
// replace rG1QQv2... with Account(alice)
boost::algorithm::replace_all(out, toBase58(alice.id()), "Account(alice)");
return out;
});
// Pass nullptr to clear:
env.app().logs().setTransform(nullptr);