comparison mod_firewall/actions.lib.lua @ 2129:26334f4a8eb9

mod_firewall: LOG uses session.log if available
author Matthew Wild <mwild1@gmail.com>
date Fri, 18 Mar 2016 09:51:01 +0000
parents edf5cf3c474b
children 07d7036040ee
comparison
equal deleted inserted replaced
2128:21bc4d7cddae 2129:26334f4a8eb9
156 end 156 end
157 157
158 function action_handlers.LOG(string) 158 function action_handlers.LOG(string)
159 local level = string:match("^%[(%a+)%]") or "info"; 159 local level = string:match("^%[(%a+)%]") or "info";
160 string = string:gsub("^%[%a+%] ?", ""); 160 string = string:gsub("^%[%a+%] ?", "");
161 return meta(("log(%q, %q)"):format(level, string)); 161 return meta(("(session.log or log)(%q, %q)"):format(level, string));
162 end 162 end
163 163
164 function action_handlers.RULEDEP(dep) 164 function action_handlers.RULEDEP(dep)
165 return "", { dep }; 165 return "", { dep };
166 end 166 end