view mod_log_rate/mod_log_rate.lua @ 2236:86bc6e1d9d4d

mod_http_muc_log: Find next and previous date with date index if this is supported by the storage driver
author Kim Alvefur <zash@zash.se>
date Fri, 08 Jul 2016 22:40:30 +0200
parents 217456783219
children f388747c53c7
line wrap: on
line source

module:set_global();

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

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