diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-04-15 19:45:25 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-04-15 19:45:25 +0800 |
commit | 8a519ff707b621460227516383a11674c5d2e406 (patch) | |
tree | 9dc9faf21e957fc23ae3aa13dcdbc25f9871b918 | |
parent | 491876016134b50680667053177faeae411aa9a2 (diff) | |
download | lua-language-server-8a519ff707b621460227516383a11674c5d2e406.zip |
cleanup
-rw-r--r-- | main.lua | 4 | ||||
-rw-r--r-- | script/log.lua | 9 |
2 files changed, 7 insertions, 6 deletions
@@ -52,8 +52,8 @@ METAPATH = METAPATH and util.expandPath(METAPATH) or (ROOT:string() .. '/meta') ---@diagnostic disable-next-line: deprecated debug.setcstacklimit(200) ---collectgarbage('generational', 5, 25) -collectgarbage('incremental', 120, 120, 0) +collectgarbage('generational', 10, 50) +--collectgarbage('incremental', 120, 120, 0) ---@diagnostic disable-next-line: lowercase-global log = require 'log' diff --git a/script/log.lua b/script/log.lua index 2076348c..597bdc4e 100644 --- a/script/log.lua +++ b/script/log.lua @@ -65,10 +65,6 @@ local function pushLog(level, ...) local info = debugGetInfo(3, 'Sl') local text = m.raw(0, level, str, info.source, info.currentline, monotonic()) - if log.print then - print(text) - end - return text end @@ -127,6 +123,11 @@ function m.raw(thd, level, msg, source, currentline, clock) m.file:write(buf) end end + + if log.print then + print(buf) + end + return buf end |