Comparison

plugins/mod_posix.lua @ 5450:cc83b1a50fde

mod_posix: Pass logger name to syslog, so that sources now get logged
author Matthew Wild <mwild1@gmail.com>
date Mon, 08 Apr 2013 16:57:05 +0100
parent 5177:add9ad38208e
child 5451:941ad88db8f3
comparison
equal deleted inserted replaced
5449:35a271b4b920 5450:cc83b1a50fde
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
121 syslog(level, format(message, ...)); 121 syslog(level, name, format(message, ...));
122 else 122 else
123 syslog(level, message); 123 syslog(level, name, message);
124 end 124 end
125 end; 125 end;
126 end 126 end
127 require "core.loggingmanager".register_sink_type("syslog", syslog_sink_maker); 127 require "core.loggingmanager".register_sink_type("syslog", syslog_sink_maker);
128 128