diff --git a/include/ircd/m/sync.h b/include/ircd/m/sync.h index f1002ed66..44d57d6d4 100644 --- a/include/ircd/m/sync.h +++ b/include/ircd/m/sync.h @@ -36,6 +36,7 @@ namespace ircd::m::sync extern log::log log; extern ctx::pool pool; + extern conf::item debug_stats; } struct ircd::m::sync::item diff --git a/ircd/m.cc b/ircd/m.cc index 48ec535ef..e23cce463 100644 --- a/ircd/m.cc +++ b/ircd/m.cc @@ -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]; diff --git a/modules/client/sync/rooms.cc b/modules/client/sync/rooms.cc index 446b45d03..15ee5574c 100644 --- a/modules/client/sync/rooms.cc +++ b/modules/client/sync/rooms.cc @@ -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),