aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2015-03-23 18:44:12 +0100
committerKim Alvefur <zash@zash.se>2015-03-23 18:44:12 +0100
commite1988edd2e558c25c5eb38439fbbc549fd151302 (patch)
tree7429f434c89515e066d6e620518377b96da80c7e /plugins
parent833a34dd6591bd37fc5d937df64db0462f160a72 (diff)
downloadprosody-e1988edd2e558c25c5eb38439fbbc549fd151302.tar.gz
prosody-e1988edd2e558c25c5eb38439fbbc549fd151302.zip
mod_http: Log a debug message when adding new http apps and warn if no http ports are enabled
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_http.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/mod_http.lua b/plugins/mod_http.lua
index 86689aff..9ff3af74 100644
--- a/plugins/mod_http.lua
+++ b/plugins/mod_http.lua
@@ -110,6 +110,12 @@ function module.add_host(module)
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)