view mod_log_rate/mod_log_rate.lua @ 4709:679f1834dbdb default tip

mod_delegation: update to XEP-0355 v0.5 - namespace bump to "urn:xmpp:delegation:2" - disco remaining infos now uses the XEP defined "urn:xmpp:delegation:2:bare:disco#info:*" namespace - complemeted disco remaining infos implementation for requests made on nodes not already managed by the server - bare JID disco items now uses the XEP defined "urn:xmpp:delegation:2:bare:disco#items:*'" namespace
author Goffi <>
date Fri, 15 Oct 2021 15:10:36 +0200
parents f388747c53c7
line wrap: on
line source


local function sink_maker(config)
	local levels = {
		debug = module:measure("log.debug", "rate");
		info = module:measure("", "rate");
		warn = module:measure("log.warn", "rate");
		error = module:measure("log.error", "rate");
	return function (_, level)
		return levels[level]();

require"core.loggingmanager".register_sink_type("measure", sink_maker);