Comparison

plugins/mod_posix.lua @ 4794:25ce7720555f

mod_posix: Support syslog_facility config option
author Matthew Wild <mwild1@gmail.com>
date Thu, 26 Apr 2012 18:14:42 +0100
parent 3555:6938b6153890
child 4797:e239668aa6d2
comparison
equal deleted inserted replaced
4793:eaa8991998d5 4794:25ce7720555f
110 end 110 end
111 111
112 local syslog_opened; 112 local syslog_opened;
113 function syslog_sink_maker(config) 113 function syslog_sink_maker(config)
114 if not syslog_opened then 114 if not syslog_opened then
115 pposix.syslog_open("prosody"); 115 pposix.syslog_open("prosody", module:get_option_string("syslog_facility"));
116 syslog_opened = true; 116 syslog_opened = true;
117 end 117 end
118 local syslog, format = pposix.syslog_log, string.format; 118 local syslog, format = pposix.syslog_log, string.format;
119 return function (name, level, message, ...) 119 return function (name, level, message, ...)
120 if ... then 120 if ... then