aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-01-06 16:16:23 +0000
committerMatthew Wild <mwild1@gmail.com>2010-01-06 16:16:23 +0000
commitf5a5f7d23998231ab5bd4915572ddde9c4f6d39d (patch)
treed3c730f6ac724629df69e6ac08c4c5e85da3cd6a /net
parent801cc75c5786d3e47f8a30adec7475067804fff5 (diff)
downloadprosody-f5a5f7d23998231ab5bd4915572ddde9c4f6d39d.tar.gz
prosody-f5a5f7d23998231ab5bd4915572ddde9c4f6d39d.zip
net.server_select: Allow setting the logger using server.setlogger
Diffstat (limited to 'net')
-rw-r--r--net/server_select.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/net/server_select.lua b/net/server_select.lua
index 8f6ddf5b..e159be99 100644
--- a/net/server_select.lua
+++ b/net/server_select.lua
@@ -905,6 +905,14 @@ addtimer( function( )
end
)
+local function set_logger(new_logger)
+ local old_logger = log;
+ if new_logger then
+ log = new_logger;
+ end
+ return old_logger;
+end
+
----------------------------------// PUBLIC INTERFACE //--
return {
@@ -918,6 +926,7 @@ return {
addtimer = addtimer,
addserver = addserver,
getserver = getserver,
+ setlogger = setlogger,
getsettings = getsettings,
setquitting = setquitting,
removeserver = removeserver,