diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-07-21 20:56:43 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-07-21 20:56:43 +0800 |
commit | ec0d35bbca1fd3e5bc3725f52b7c2a88cd98b3be (patch) | |
tree | dbada43096d754fe5f836829c4fa76ca9a36f080 | |
parent | a8e09c73183228518cd77f686e01ffbfc9dfdc5a (diff) | |
download | lua-language-server-ec0d35bbca1fd3e5bc3725f52b7c2a88cd98b3be.zip |
改改日志格式
-rw-r--r-- | script-beta/log.lua | 4 | ||||
-rw-r--r-- | script/log.lua | 2 |
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 |