diff -r beec1eb7d9c6 -r d61eabc678a6 util/logger.lua --- a/util/logger.lua Wed Jan 14 22:35:01 2009 +0500 +++ b/util/logger.lua Wed Jan 14 23:04:16 2009 +0500 @@ -63,10 +63,12 @@ end function setwriter(f) - if not f then outfunction = nil; return true, nil; end + local old_func = outfunction; + if not f then outfunction = nil; return true, old_func; end local ok, ret = pcall(f, "logger", "info", "Switched logging output successfully"); if ok then outfunction = f; + ret = old_func; end return ok, ret; end