Software /
code /
prosody
Changeset
6597:321321f566fb
mod_http: Log a debug message when adding new http apps and warn if no http ports are enabled
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 23 Mar 2015 18:44:12 +0100 |
parents | 6596:27c10ee82d60 |
children | 6598:4b4852c4f96a |
files | plugins/mod_http.lua |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_http.lua Mon Mar 23 18:40:12 2015 +0100 +++ b/plugins/mod_http.lua Mon Mar 23 18:44:12 2015 +0100 @@ -110,6 +110,12 @@ module:log("error", "Invalid route in %s, %q. See http://prosody.im/doc/developers/http#routes", app_name, key); end end + local services = portmanager.get_active_services(); + if services:get("https") or services:get("http") then + module:log("debug", "Serving '%s' at %s", app_name, module:http_url(app_name, app_path)); + else + module:log("warn", "Not listening on any ports, '%s' will be unreachable", app_name); + end end local function http_app_removed(event)