summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-07-21 20:56:43 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-07-21 20:56:43 +0800
commitec0d35bbca1fd3e5bc3725f52b7c2a88cd98b3be (patch)
treedbada43096d754fe5f836829c4fa76ca9a36f080
parenta8e09c73183228518cd77f686e01ffbfc9dfdc5a (diff)
downloadlua-language-server-ec0d35bbca1fd3e5bc3725f52b7c2a88cd98b3be.zip
改改日志格式
-rw-r--r--script-beta/log.lua4
-rw-r--r--script/log.lua2
2 files changed, 3 insertions, 3 deletions
diff --git a/script-beta/log.lua b/script-beta/log.lua
index c3b08198..6af189dc 100644
--- a/script-beta/log.lua
+++ b/script-beta/log.lua
@@ -99,9 +99,9 @@ function m.raw(thd, level, msg, source, currentline, clock)
end
local buf
if currentline == -1 then
- buf = ('[%s.%03.f][%s]: %s[#%d]%s\n'):format(timestr, ms * 1000, level, agl, thd, msg)
+ buf = ('[%s.%03.f][%s]%s[#%d]: %s\n'):format(timestr, ms * 1000, level, agl, thd, msg)
else
- buf = ('[%s.%03.f][%s]: %s[#%d:%s:%s]%s\n'):format(timestr, ms * 1000, level, agl, thd, trimSrc(source), currentline, msg)
+ buf = ('[%s.%03.f][%s]%s[#%d:%s:%s]: %s\n'):format(timestr, ms * 1000, level, agl, thd, trimSrc(source), currentline, msg)
end
m.file:write(buf)
m.size = m.size + #buf
diff --git a/script/log.lua b/script/log.lua
index d8e782c0..71a903d9 100644
--- a/script/log.lua
+++ b/script/log.lua
@@ -55,7 +55,7 @@ local function push_log(level, ...)
local info = debug.getinfo(3, 'Sl')
local buf
if info and info.currentline > 0 then
- buf = ('[%s.%03.f][%s]: [%s:%s]%s\n'):format(timestr, ms * 1000, level, trim_src(info.source), info.currentline, str)
+ buf = ('[%s.%03.f][%s][%s:%s]: %s\n'):format(timestr, ms * 1000, level, trim_src(info.source), info.currentline, str)
else
buf = ('[%s.%03.f][%s]: %s\n'):format(timestr, ms * 1000, level, str)
end