aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_posix.lua
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2017-09-10 13:05:45 -0400
committerWaqas Hussain <waqas20@gmail.com>2017-09-10 13:05:45 -0400
commit79acb207db938b5f8c6384fa36a0d2467f763b9a (patch)
treee88b65d8d20941d8135c35f87a04a82ca644d1d6 /plugins/mod_posix.lua
parent7e94950115a5c22748cf5a6c358a41ef74ce00fe (diff)
downloadprosody-79acb207db938b5f8c6384fa36a0d2467f763b9a.tar.gz
prosody-79acb207db938b5f8c6384fa36a0d2467f763b9a.zip
loggingmanager, mod_posix: Replace the old inconsistent log formatting with the new util.format
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 32fc27bc..b2984add 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";
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);