aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_posix.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-09-14 02:48:34 +0200
committerKim Alvefur <zash@zash.se>2017-09-14 02:48:34 +0200
commit2547ccfe3d26fbf57e0ecddf5cfd5d21377c3633 (patch)
treeae64d69a765500ad798ce354363683ab22571fa3 /plugins/mod_posix.lua
parent8483401b3203a6745fafea2303727732c8f08ec7 (diff)
parent3937703c4d9a2ea3200d93d7e3a1eecea3f1e1cb (diff)
downloadprosody-2547ccfe3d26fbf57e0ecddf5cfd5d21377c3633.tar.gz
prosody-2547ccfe3d26fbf57e0ecddf5cfd5d21377c3633.zip
Merge 0.10->trunk
Diffstat (limited to 'plugins/mod_posix.lua')
-rw-r--r--plugins/mod_posix.lua9
1 files changed, 3 insertions, 6 deletions
diff --git a/plugins/mod_posix.lua b/plugins/mod_posix.lua
index 49addafe..9b7d59f5 100644
--- a/plugins/mod_posix.lua
+++ b/plugins/mod_posix.lua
@@ -20,6 +20,7 @@ if not have_signal then
module:log("warn", "Couldn't load signal library, won't respond to SIGTERM");
end
+local format = require "util.format".format;
local lfs = require "lfs";
local stat = lfs.attributes;
@@ -118,13 +119,9 @@ function syslog_sink_maker(config) -- luacheck: ignore 212/config
pposix.syslog_open("prosody", module:get_option_string("syslog_facility"));
syslog_opened = true;
end
- local syslog, format = pposix.syslog_log, string.format;
+ local syslog = pposix.syslog_log;
return function (name, level, message, ...)
- if ... then
- syslog(level, name, format(message, ...));
- else
- syslog(level, name, message);
- end
+ syslog(level, name, format(message, ...));
end;
end
require "core.loggingmanager".register_sink_type("syslog", syslog_sink_maker);