0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 10:12:39 +01:00

ircd:Ⓜ️:sync: Add conf item for polylog item stats to debuglog.

This commit is contained in:
Jason Volk 2019-02-22 09:53:51 -08:00
parent 4797cf8b5e
commit a4e709c6d4
3 changed files with 10 additions and 2 deletions

View file

@ -36,6 +36,7 @@ namespace ircd::m::sync
extern log::log log;
extern ctx::pool pool;
extern conf::item<bool> debug_stats;
}
struct ircd::m::sync::item

View file

@ -419,6 +419,13 @@ ircd::m::sync::pool
"sync", pool_opts
};
decltype(ircd::m::sync::debug_stats)
ircd::m::sync::debug_stats
{
{ "name", "ircd.m.sync.debug_stats" },
{ "default", false },
};
bool
ircd::m::sync::for_each(const item_closure_bool &closure)
{
@ -677,7 +684,7 @@ try
_polylog(data);
#ifdef RB_DEBUG
if(data.stats)
if(data.stats && bool(debug_stats))
{
//data.out.flush();
thread_local char tmbuf[32];

View file

@ -109,7 +109,7 @@ ircd::m::sync::_rooms_polylog(data &data,
#ifdef RB_DEBUG
thread_local char tmbuf[32];
if(data.stats) log::debug
if(data.stats && bool(debug_stats)) log::debug
{
log, "polylog %s %s in %s",
loghead(data),