From fcb0996a5f75121b7470e013ed08e3fb191a908d Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Fri, 19 Jun 2009 17:22:16 +0100 Subject: loggingmanager: Enable debug level for default file logging when 'debug' mode is enabled in the config --- core/loggingmanager.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'core') diff --git a/core/loggingmanager.lua b/core/loggingmanager.lua index aa8f368d..a8f6e1dc 100644 --- a/core/loggingmanager.lua +++ b/core/loggingmanager.lua @@ -12,6 +12,7 @@ local getstyle, getstring = require "util.termcolours".getstyle, require "util.t local config = require "core.configmanager"; local eventmanager = require "core.eventmanager"; local logger = require "util.logger"; +local debug_mode = config.get("*", "core", "debug"); _G.log = logger.init("general"); @@ -19,7 +20,7 @@ module "loggingmanager" -- The log config used if none specified in the config file local default_logging = { { to = "console" } }; -local default_file_logging = { { to = "file", levels = { min = "info" } } }; +local default_file_logging = { { to = "file", levels = { min = (debug_mode and "debug") or "info" } } }; local default_timestamp = "%b %d %T"; -- The actual config loggingmanager is using local logging_config = config.get("*", "core", "log") or default_logging; -- cgit v1.2.3 From 7d12a19107c45a4bec5427b0259beebbad7d3bd3 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Fri, 19 Jun 2009 17:23:17 +0100 Subject: loggingmanager: Log timestamps when using default file logging --- core/loggingmanager.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core') diff --git a/core/loggingmanager.lua b/core/loggingmanager.lua index a8f6e1dc..2be21a17 100644 --- a/core/loggingmanager.lua +++ b/core/loggingmanager.lua @@ -20,7 +20,7 @@ module "loggingmanager" -- The log config used if none specified in the config file local default_logging = { { to = "console" } }; -local default_file_logging = { { to = "file", levels = { min = (debug_mode and "debug") or "info" } } }; +local default_file_logging = { { to = "file", levels = { min = (debug_mode and "debug") or "info" }, timestamps = true } }; local default_timestamp = "%b %d %T"; -- The actual config loggingmanager is using local logging_config = config.get("*", "core", "log") or default_logging; -- cgit v1.2.3 From cd970ddf0d7275c1a42f7a68effa6acc699f93e5 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Fri, 19 Jun 2009 17:27:03 +0100 Subject: s2smanager: Remove srv_hosts from session when connected, this fixes attempting to reconnect s2s sessions when they are closed during shutdown --- core/s2smanager.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'core') diff --git a/core/s2smanager.lua b/core/s2smanager.lua index b8faf712..879084d8 100644 --- a/core/s2smanager.lua +++ b/core/s2smanager.lua @@ -379,6 +379,8 @@ function mark_connected(session) end session.sendq = nil; end + + session.srv_hosts = nil; end end -- cgit v1.2.3