summaryrefslogtreecommitdiff
path: root/script/log.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-04-15 19:45:25 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-04-15 19:45:25 +0800
commit8a519ff707b621460227516383a11674c5d2e406 (patch)
tree9dc9faf21e957fc23ae3aa13dcdbc25f9871b918 /script/log.lua
parent491876016134b50680667053177faeae411aa9a2 (diff)
downloadlua-language-server-8a519ff707b621460227516383a11674c5d2e406.zip
cleanup
Diffstat (limited to 'script/log.lua')
-rw-r--r--script/log.lua9
1 files changed, 5 insertions, 4 deletions
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