Comparison

plugins/mod_http.lua @ 10460:5ce6cbb5ce6a

mod_http: Log served URLs at 'info' level These are similar to the "activated service" messages from portmanager and similarily useful for the service admin to know even if they're not debugging anything.
author Kim Alvefur <zash@zash.se>
date Fri, 29 Nov 2019 21:30:08 +0100
parent 10409:abfc05495d8b
child 10465:09697a673015
comparison
equal deleted inserted replaced
10459:7456eaa83b15 10460:5ce6cbb5ce6a
171 module:log("error", "Invalid route in %s, %q. See https://prosody.im/doc/developers/http#routes", app_name, key); 171 module:log("error", "Invalid route in %s, %q. See https://prosody.im/doc/developers/http#routes", app_name, key);
172 end 172 end
173 end 173 end
174 local services = portmanager.get_active_services(); 174 local services = portmanager.get_active_services();
175 if services:get("https") or services:get("http") then 175 if services:get("https") or services:get("http") then
176 module:log("debug", "Serving '%s' at %s", app_name, module:http_url(app_name, app_path)); 176 module:log("info", "Serving '%s' at %s", app_name, module:http_url(app_name, app_path));
177 else 177 else
178 module:log("warn", "Not listening on any ports, '%s' will be unreachable", app_name); 178 module:log("warn", "Not listening on any ports, '%s' will be unreachable", app_name);
179 end 179 end
180 end 180 end
181 181