mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Merge branch 'topic/amazingpp/broker-debug-output-truncated' of ssh://github.com/AmazingPP/zeek
* 'topic/amazingpp/broker-debug-output-truncated' of ssh://github.com/AmazingPP/zeek: Use json_escape_utf8 in broker debug output
This commit is contained in:
commit
2959afba8a
3 changed files with 12 additions and 8 deletions
4
CHANGES
4
CHANGES
|
@ -1,3 +1,7 @@
|
||||||
|
5.2.0-dev.147 | 2022-10-26 11:37:24 +0200
|
||||||
|
|
||||||
|
* GH-2272: Use `json_escape_utf8` in broker debug output (AmazingPP)
|
||||||
|
|
||||||
5.2.0-dev.145 | 2022-10-26 10:51:05 +0200
|
5.2.0-dev.145 | 2022-10-26 10:51:05 +0200
|
||||||
|
|
||||||
* Reintroduce event groups. (Arne Welzel, Corelight)
|
* Reintroduce event groups. (Arne Welzel, Corelight)
|
||||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
5.2.0-dev.145
|
5.2.0-dev.147
|
||||||
|
|
|
@ -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