Changeset

2202:217456783219

mod_log_rate: Use moduleapi
author Kim Alvefur <zash@zash.se>
date Thu, 09 Jun 2016 11:32:23 +0200
parents 2201:eb5555a3a535
children 2203:2dcc3079572c
files mod_log_rate/mod_log_rate.lua
diffstat 1 files changed, 4 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/mod_log_rate/mod_log_rate.lua	Mon Jun 06 15:58:41 2016 +0200
+++ b/mod_log_rate/mod_log_rate.lua	Thu Jun 09 11:32:23 2016 +0200
@@ -1,13 +1,11 @@
 module:set_global();
 
-local measure = require"core.statsmanager".measure;
-
 local function sink_maker(config)
 	local levels = {
-		debug = measure("rate", "log.debug");
-		info = measure("rate", "log.info");
-		warn = measure("rate", "log.warn");
-		error = measure("rate", "log.error");
+		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]();