From 6568eebd4b875b412bf3a49bc93a2c66c27ebc4d Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Thu, 6 May 2010 15:38:11 +0500 Subject: loggingmanager: Enable debug level for default console logging when 'debug' mode is enabled in the config. --- core/loggingmanager.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/loggingmanager.lua b/core/loggingmanager.lua index b329bf11..3ec696d5 100644 --- a/core/loggingmanager.lua +++ b/core/loggingmanager.lua @@ -33,7 +33,7 @@ _G.log = logger.init("general"); module "loggingmanager" -- The log config used if none specified in the config file -local default_logging = { { to = "console" } }; +local default_logging = { { to = "console" , 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 %H:%M:%S"; -- The actual config loggingmanager is using -- cgit v1.2.3 From 5394f55419896520bd65088e5e71078006478e9c Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Fri, 7 May 2010 16:00:33 +0500 Subject: prosody: Lowered log level for a log message. --- prosody | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prosody b/prosody index c7f91456..0232b83b 100755 --- a/prosody +++ b/prosody @@ -331,7 +331,7 @@ function init_data_store() end function prepare_to_start() - log("info", "Prosody is using the %s backend for connection handling", server.get_backend()); + log("debug", "Prosody is using the %s backend for connection handling", server.get_backend()); -- Signal to modules that we are ready to start eventmanager.fire_event("server-starting"); prosody.events.fire_event("server-starting"); -- cgit v1.2.3 From 43658f9669a5a3566bdf12e81b3793fdecacf4eb Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Fri, 7 May 2010 16:02:29 +0500 Subject: prosody: Modified function metatable for better string representation of functions. --- prosody | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/prosody b/prosody index 0232b83b..e4e82105 100755 --- a/prosody +++ b/prosody @@ -143,6 +143,10 @@ function set_function_metatable() debug.setupvalue(f, i, value); end end + function mt.__tostring(f) + local info = debug.getinfo(f); + return ("function(%s:%d)"):format(info.short_src:match("[^\\/]*$"), info.linedefined); + end debug.setmetatable(function() end, mt); end -- cgit v1.2.3 From 5459f25151b4de3d3d51120dbf2a6ee8ebabb088 Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Fri, 7 May 2010 16:13:05 +0500 Subject: mod_console: Ensure that a null byte is printed after sending the banner. --- plugins/mod_console.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/mod_console.lua b/plugins/mod_console.lua index 4457a2f3..4180e2b6 100644 --- a/plugins/mod_console.lua +++ b/plugins/mod_console.lua @@ -58,6 +58,7 @@ function console_listener.onconnect(conn) local session = console:new_session(conn); sessions[conn] = session; printbanner(session); + session.send(string.char(0)); end function console_listener.onincoming(conn, data) -- cgit v1.2.3