Software /
code /
prosody
Changeset
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 |
parents | 2422:affeb565b050 |
children | 2424:7d3b071e3b5b |
files | net/server_select.lua |
diffstat | 1 files changed, 9 insertions(+), 0 deletions(-) [+] |
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,