Comparison

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
comparison
equal deleted inserted replaced
2422:affeb565b050 2423:0597c553acf2
903 end 903 end
904 end 904 end
905 end 905 end
906 ) 906 )
907 907
908 local function set_logger(new_logger)
909 local old_logger = log;
910 if new_logger then
911 log = new_logger;
912 end
913 return old_logger;
914 end
915
908 ----------------------------------// PUBLIC INTERFACE //-- 916 ----------------------------------// PUBLIC INTERFACE //--
909 917
910 return { 918 return {
911 919
912 addclient = addclient, 920 addclient = addclient,
916 stats = stats, 924 stats = stats,
917 closeall = closeall, 925 closeall = closeall,
918 addtimer = addtimer, 926 addtimer = addtimer,
919 addserver = addserver, 927 addserver = addserver,
920 getserver = getserver, 928 getserver = getserver,
929 setlogger = setlogger,
921 getsettings = getsettings, 930 getsettings = getsettings,
922 setquitting = setquitting, 931 setquitting = setquitting,
923 removeserver = removeserver, 932 removeserver = removeserver,
924 get_backend = get_backend, 933 get_backend = get_backend,
925 changesettings = changesettings, 934 changesettings = changesettings,