diff options
author | sumneko <sumneko@hotmail.com> | 2022-01-23 17:55:19 +0800 |
---|---|---|
committer | sumneko <sumneko@hotmail.com> | 2022-01-23 17:55:19 +0800 |
commit | 3a0596e06cdb8f3f7e055fdcd21862de4906647e (patch) | |
tree | 526885608e4c850fdbf46be235a5057006225476 /script/provider/diagnostic.lua | |
parent | bb4a7a3c64eed7d5269ab5eef830bdf211839f11 (diff) | |
download | lua-language-server-3a0596e06cdb8f3f7e055fdcd21862de4906647e.zip |
add logs
Diffstat (limited to 'script/provider/diagnostic.lua')
-rw-r--r-- | script/provider/diagnostic.lua | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/script/provider/diagnostic.lua b/script/provider/diagnostic.lua index f0967af2..676bc6c5 100644 --- a/script/provider/diagnostic.lua +++ b/script/provider/diagnostic.lua @@ -222,6 +222,8 @@ function m.doDiagnostic(uri, isScopeDiag) local prog <close> = progress.create(scp, lang.script.WINDOW_DIAGNOSING, 0.5) prog:setMessage(ws.getRelativePath(uri)) + log.debug('Diagnostic file:', uri) + local syntax = m.syntaxErrors(uri, state) local diags = {} @@ -230,6 +232,7 @@ function m.doDiagnostic(uri, isScopeDiag) tracy.ZoneBeginN 'mergeSyntaxAndDiags' local _ <close> = tracy.ZoneEnd local full = mergeDiags(syntax, lastDiag, diags) + log.debug(('Pushed [%d] results'):format(full and #full or 0)) if not full then m.clear(uri) return @@ -372,7 +375,7 @@ function m.diagnosticsScope(uri, force) end) end) local uris = files.getAllUris(uri) - log.info(('diagnostics scope [%s], files count:[%d]'):format(scp:getName(), #uris)) + log.info(('Diagnostics scope [%s], files count:[%d]'):format(scp:getName(), #uris)) for i, uri in ipairs(uris) do while loading.count() > 0 do await.sleep(1.0) @@ -387,7 +390,7 @@ function m.diagnosticsScope(uri, force) end end bar:remove() - log.debug('全文诊断耗时:', os.clock() - clock) + log.debug(('Diagnostics scope [%s] finished, takes [%.3f] sec.'):format(scp:getName(), os.clock() - clock)) end, id) end |