From 372de588bef4020c87d1c7f558f3af96ac94a219 Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Mon, 29 Apr 2013 22:03:17 +0500 Subject: portmanager: Include port numbers the service is listening on in the info logs. --- core/portmanager.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'core') diff --git a/core/portmanager.lua b/core/portmanager.lua index 1b767a09..923174c2 100644 --- a/core/portmanager.lua +++ b/core/portmanager.lua @@ -112,6 +112,7 @@ function activate(service_name) bind_ports = set.new(type(bind_ports) ~= "table" and { bind_ports } or bind_ports ); local mode, ssl = listener.default_mode or "*a"; + local hooked_ports = {}; for interface in bind_interfaces do for port in bind_ports do @@ -152,6 +153,7 @@ function activate(service_name) if not handler then log("error", "Failed to open server port %d on %s, %s", port_number, interface, error_to_friendly_message(service_name, port_number, err)); else + table.insert(hooked_ports, port_number); log("debug", "Added listening service %s to [%s]:%d", service_name, interface, port_number); active_services:add(service_name, interface, port_number, { server = handler; @@ -162,7 +164,7 @@ function activate(service_name) end end end - log("info", "Activated service '%s'", service_name); + log("info", "Activated service '%s' on %s", service_name, #hooked_ports == 0 and "no ports" or table.concat(hooked_ports, ", ")); return true; end -- cgit v1.2.3 From 99c908e11a5ca1b6a26c48f051c1ea1db9117536 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Mon, 29 Apr 2013 19:40:39 +0200 Subject: portmanager: Also include the interface the service is listening on --- core/portmanager.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core') diff --git a/core/portmanager.lua b/core/portmanager.lua index 923174c2..7a247452 100644 --- a/core/portmanager.lua +++ b/core/portmanager.lua @@ -153,7 +153,7 @@ function activate(service_name) if not handler then log("error", "Failed to open server port %d on %s, %s", port_number, interface, error_to_friendly_message(service_name, port_number, err)); else - table.insert(hooked_ports, port_number); + table.insert(hooked_ports, "["..interface.."]:"..port_number); log("debug", "Added listening service %s to [%s]:%d", service_name, interface, port_number); active_services:add(service_name, interface, port_number, { server = handler; -- cgit v1.2.3