diff options
Diffstat (limited to 'util')
-rw-r--r-- | util/logger.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/util/logger.lua b/util/logger.lua index 5115bbda..bbc783d4 100644 --- a/util/logger.lua +++ b/util/logger.lua @@ -63,10 +63,12 @@ function init(name) 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 |