summaryrefslogtreecommitdiff
path: root/script/workspace
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-04-05 23:03:16 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-04-05 23:03:16 +0800
commitc0cf9ae2835f9a19fe6a9af743ddd24be7c3a123 (patch)
tree503bec02eaffff462aa23f5cbb92af2983a6036c /script/workspace
parent8422502419f2a5138c2772aea60111fa7e9599aa (diff)
downloadlua-language-server-c0cf9ae2835f9a19fe6a9af743ddd24be7c3a123.zip
#1018 cleanup logs
Diffstat (limited to 'script/workspace')
-rw-r--r--script/workspace/loading.lua13
-rw-r--r--script/workspace/workspace.lua22
2 files changed, 17 insertions, 18 deletions
diff --git a/script/workspace/loading.lua b/script/workspace/loading.lua
index 3cdeaad6..fa8f780f 100644
--- a/script/workspace/loading.lua
+++ b/script/workspace/loading.lua
@@ -85,7 +85,7 @@ function mt:loadFile(uri, libraryUri)
files.addRef(uri)
end
self._cache[uri] = true
- log.info(('Skip loaded file: %s'):format(uri))
+ log.debug(('Skip loaded file: %s'):format(uri))
else
local content = pub.awaitTask('loadFile', furi.decode(uri))
self.read = self.read + 1
@@ -93,7 +93,7 @@ function mt:loadFile(uri, libraryUri)
if not content then
return
end
- log.info(('Preload file at: %s , size = %.3f KB'):format(uri, #content / 1024.0))
+ log.debug(('Preload file at: %s , size = %.3f KB'):format(uri, #content / 1024.0))
files.setText(uri, content, false)
if not self._cache[uri] then
files.addRef(uri)
@@ -101,7 +101,7 @@ function mt:loadFile(uri, libraryUri)
self._cache[uri] = true
end
if libraryUri then
- log.info('++++As library of:', libraryUri)
+ log.debug('++++As library of:', libraryUri)
end
end
elseif files.isDll(uri) then
@@ -116,7 +116,7 @@ function mt:loadFile(uri, libraryUri)
files.addRef(uri)
end
self._cache[uri] = true
- log.info(('Skip loaded file: %s'):format(uri))
+ log.debug(('Skip loaded file: %s'):format(uri))
else
local content = pub.awaitTask('loadFile', furi.decode(uri))
self.read = self.read + 1
@@ -124,7 +124,7 @@ function mt:loadFile(uri, libraryUri)
if not content then
return
end
- log.info(('Preload dll at: %s , size = %.3f KB'):format(uri, #content / 1024.0))
+ log.debug(('Preload dll at: %s , size = %.3f KB'):format(uri, #content / 1024.0))
files.saveDll(uri, content)
if not self._cache[uri] then
files.addRef(uri)
@@ -132,7 +132,7 @@ function mt:loadFile(uri, libraryUri)
self._cache[uri] = true
end
if libraryUri then
- log.info('++++As library of:', libraryUri)
+ log.debug('++++As library of:', libraryUri)
end
end
end
@@ -142,7 +142,6 @@ end
---@async
function mt:loadAll()
while self.read < self.max do
- log.info(('Loaded %d/%d files'):format(self.read, self.max))
self:update()
local loader = table.remove(self._stash)
if loader then
diff --git a/script/workspace/workspace.lua b/script/workspace/workspace.lua
index 934c0735..c0385085 100644
--- a/script/workspace/workspace.lua
+++ b/script/workspace/workspace.lua
@@ -100,7 +100,7 @@ function m.getNativeMatcher(scp)
local pattern = {}
for path, ignore in pairs(config.get(scp.uri, 'files.exclude')) do
if ignore then
- log.info('Ignore by exclude:', path)
+ log.debug('Ignore by exclude:', path)
pattern[#pattern+1] = path
end
end
@@ -109,7 +109,7 @@ function m.getNativeMatcher(scp)
if buf then
for line in buf:gmatch '[^\r\n]+' do
if line:sub(1, 1) ~= '#' then
- log.info('Ignore by .gitignore:', line)
+ log.debug('Ignore by .gitignore:', line)
pattern[#pattern+1] = line
end
end
@@ -118,7 +118,7 @@ function m.getNativeMatcher(scp)
if buf then
for line in buf:gmatch '[^\r\n]+' do
if line:sub(1, 1) ~= '#' then
- log.info('Ignore by .git/info/exclude:', line)
+ log.debug('Ignore by .git/info/exclude:', line)
pattern[#pattern+1] = line
end
end
@@ -128,7 +128,7 @@ function m.getNativeMatcher(scp)
local buf = util.loadFile(furi.decode(scp.uri) .. '/.gitmodules')
if buf then
for path in buf:gmatch('path = ([^\r\n]+)') do
- log.info('Ignore by .gitmodules:', path)
+ log.debug('Ignore by .gitmodules:', path)
pattern[#pattern+1] = path
end
end
@@ -136,12 +136,12 @@ function m.getNativeMatcher(scp)
for path in pairs(config.get(scp.uri, 'Lua.workspace.library')) do
path = m.getAbsolutePath(scp.uri, path)
if path then
- log.info('Ignore by library:', path)
- pattern[#pattern+1] = path
+ log.debug('Ignore by library:', path)
+ debug[#pattern+1] = path
end
end
for _, path in ipairs(config.get(scp.uri, 'Lua.workspace.ignoreDir')) do
- log.info('Ignore directory:', path)
+ log.debug('Ignore directory:', path)
pattern[#pattern+1] = path
end
@@ -160,17 +160,17 @@ function m.getLibraryMatchers(scp)
if scp:get 'libraryMatcher' then
return scp:get 'libraryMatcher'
end
- log.info('Build library matchers:', scp)
+ log.debug('Build library matchers:', scp)
local pattern = {}
for path, ignore in pairs(config.get(scp.uri, 'files.exclude')) do
if ignore then
- log.info('Ignore by exclude:', path)
+ log.debug('Ignore by exclude:', path)
pattern[#pattern+1] = path
end
end
for _, path in ipairs(config.get(scp.uri, 'Lua.workspace.ignoreDir')) do
- log.info('Ignore directory:', path)
+ log.debug('Ignore directory:', path)
pattern[#pattern+1] = path
end
@@ -181,7 +181,7 @@ function m.getLibraryMatchers(scp)
librarys[m.normalize(path)] = true
end
end
- log.info('meta path:', scp:get 'metaPath')
+ log.debug('meta path:', scp:get 'metaPath')
if scp:get 'metaPath' then
librarys[m.normalize(scp:get 'metaPath')] = true
end