Software /
code /
prosody
Changeset
1095:cad4205f4925
hostmanager: Reduce log output at startup to 'debug'
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sat, 02 May 2009 22:02:43 +0100 |
parents | 1094:a619525fed5d |
children | 1096:266ef0c6b1d0 |
files | core/hostmanager.lua |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/core/hostmanager.lua Sat May 02 22:01:22 2009 +0100 +++ b/core/hostmanager.lua Sat May 02 22:02:43 2009 +0100 @@ -9,6 +9,8 @@ module "hostmanager" +local hosts_loaded_once; + local function load_enabled_hosts(config) local defined_hosts = config or configmanager.getconfig(); @@ -18,13 +20,14 @@ end end eventmanager.fire_event("hosts-activated", defined_hosts); + hosts_loaded_once = true; end eventmanager.add_event_hook("server-starting", load_enabled_hosts); function activate(host, host_config) hosts[host] = {type = "local", connected = true, sessions = {}, host = host, s2sout = {} }; - log("info", "Activated host: %s", host); + log((hosts_loaded_once and "info") or "debug", "Activated host: %s", host); eventmanager.fire_event("host-activated", host, host_config); end