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:
parent
4797cf8b5e
commit
a4e709c6d4
3 changed files with 10 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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),
|
||||
|
|
Loading…
Reference in a new issue