# HG changeset patch # User Waqas Hussain # Date 1367254997 -18000 # Node ID cce17bcb7c94388f2f4171593f315aaa6dc0c806 # Parent c5d1c35c93f42a3ce67ee651ac284d67c8ee1a3f portmanager: Include port numbers the service is listening on in the info logs. diff -r c5d1c35c93f4 -r cce17bcb7c94 core/portmanager.lua --- a/core/portmanager.lua Mon Apr 29 20:26:48 2013 +0500 +++ b/core/portmanager.lua Mon Apr 29 22:03:17 2013 +0500 @@ -112,6 +112,7 @@ 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 @@ 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 @@ 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