From 1c899aec8da24ca76985ca27689322165f0ba698 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Fri, 16 Jan 2009 05:18:38 +0000 Subject: mod_posix: Check version of pposix --- plugins/mod_posix.lua | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'plugins') diff --git a/plugins/mod_posix.lua b/plugins/mod_posix.lua index 7461f237..0dd92072 100644 --- a/plugins/mod_posix.lua +++ b/plugins/mod_posix.lua @@ -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 @@ if not config_get("*", "core", "no_daemonize") then 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 -- cgit v1.2.3