Changeset

728:fa45dfb27ee5

mod_posix: Check version of pposix
author Matthew Wild <mwild1@gmail.com>
date Fri, 16 Jan 2009 05:18:38 +0000
parents 727:78c9542de94e
children 729:f62ef65d5c01
files plugins/mod_posix.lua
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_posix.lua	Fri Jan 16 04:57:36 2009 +0000
+++ b/plugins/mod_posix.lua	Fri Jan 16 05:18:38 2009 +0000
@@ -1,5 +1,8 @@
+
+local pposix_version = "0.3.0";
 
 local pposix = assert(require "util.pposix");
+if pposix._VERSION ~= want_pposix_version then log("warn", "Unknown version (%s) of binary pposix module, expected %s", tostring(pposix._VERSION), pposix_version); end
 
 local config_get = require "core.configmanager".get;
 local logger_set = require "util.logger".setwriter;
@@ -13,6 +16,7 @@
 		local logfilename = config_get("*", "core", "log");
 		if logfilename == "syslog" then
 			pposix.syslog_open("prosody");
+			pposix.syslog_setminlevel(config.get("*", "core", "minimum_log_level") or "info");
 				local syslog, format = pposix.syslog_log, string.format;
 				logwriter = function (name, level, message, ...)
 							if ... then