Software /
code /
prosody
Diff
net/server_select.lua @ 2423:0597c553acf2
net.server_select: Allow setting the logger using server.setlogger
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 06 Jan 2010 16:16:23 +0000 |
parent | 2339:b04014f42fce |
child | 2424:7d3b071e3b5b |
line wrap: on
line diff
--- a/net/server_select.lua Mon Jan 04 17:32:26 2010 +0000 +++ b/net/server_select.lua Wed Jan 06 16:16:23 2010 +0000 @@ -905,6 +905,14 @@ 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 @@ addtimer = addtimer, addserver = addserver, getserver = getserver, + setlogger = setlogger, getsettings = getsettings, setquitting = setquitting, removeserver = removeserver,