mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Use json_escape_utf8 in broker debug output
This commit is contained in:
parent
6fd0645aef
commit
2c4449e19a
1 changed files with 7 additions and 7 deletions
|
@ -189,14 +189,19 @@ struct scoped_reporter_location
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
static std::string RenderMessage(const broker::data& d)
|
||||||
|
{
|
||||||
|
return util::json_escape_utf8(broker::to_string(d));
|
||||||
|
}
|
||||||
|
|
||||||
static std::string RenderMessage(std::string topic, const broker::data& x)
|
static std::string RenderMessage(std::string topic, const broker::data& x)
|
||||||
{
|
{
|
||||||
return util::fmt("%s -> %s", broker::to_string(x).c_str(), topic.c_str());
|
return util::fmt("%s -> %s", RenderMessage(x).c_str(), topic.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::string RenderEvent(std::string topic, std::string name, const broker::data& args)
|
static std::string RenderEvent(std::string topic, std::string name, const broker::data& args)
|
||||||
{
|
{
|
||||||
return util::fmt("%s(%s) -> %s", name.c_str(), broker::to_string(args).c_str(), topic.c_str());
|
return util::fmt("%s(%s) -> %s", name.c_str(), RenderMessage(args).c_str(), topic.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::string RenderMessage(const broker::store::response& x)
|
static std::string RenderMessage(const broker::store::response& x)
|
||||||
|
@ -210,11 +215,6 @@ static std::string RenderMessage(const broker::vector* xs)
|
||||||
return broker::to_string(*xs);
|
return broker::to_string(*xs);
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::string RenderMessage(const broker::data& d)
|
|
||||||
{
|
|
||||||
return broker::to_string(d);
|
|
||||||
}
|
|
||||||
|
|
||||||
static std::string RenderMessage(const broker::vector& xs)
|
static std::string RenderMessage(const broker::vector& xs)
|
||||||
{
|
{
|
||||||
return broker::to_string(xs);
|
return broker::to_string(xs);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue