view mod_log_rate/mod_log_rate.lua @ 5221:22483cfce3ce

mod_http_oauth2: Reflect ALL attributes of the client registration Per RFC 7591: " Additionally, the authorization server MUST return all registered metadata about this client, including any fields provisioned by the authorization server itself. " The idea is that the server may replace/drop fields in the registration, so what gets reflected back to the client is the source of truth about the registration.
author Matthew Wild <mwild1@gmail.com>
date Tue, 07 Mar 2023 14:52:43 +0000
parents f388747c53c7
children
line wrap: on
line source

module:set_global();

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

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