summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
Diffstat (limited to 'script')
-rw-r--r--script/core/diagnostics/init.lua4
-rw-r--r--script/library.lua1
-rw-r--r--script/log.lua8
3 files changed, 8 insertions, 5 deletions
diff --git a/script/core/diagnostics/init.lua b/script/core/diagnostics/init.lua
index 32375a3a..562b526d 100644
--- a/script/core/diagnostics/init.lua
+++ b/script/core/diagnostics/init.lua
@@ -109,10 +109,6 @@ return function (uri, isScopeDiag, response, checked)
return nil
end
- if TEST then
- log.debug('do diagnostic @', uri)
- end
-
for _, name in ipairs(diagList) do
await.delay()
check(uri, name, isScopeDiag, response)
diff --git a/script/library.lua b/script/library.lua
index a4f14514..32eaea8e 100644
--- a/script/library.lua
+++ b/script/library.lua
@@ -201,6 +201,7 @@ local function loadMetaLocale(langID, result)
end
local function initBuiltIn(uri)
+ log.info('Init builtin library at:', uri)
local scp = ws.getScope(uri)
local langID = lang.id
local version = config.get(uri, 'Lua.runtime.version')
diff --git a/script/log.lua b/script/log.lua
index 90de895a..507051ae 100644
--- a/script/log.lua
+++ b/script/log.lua
@@ -55,7 +55,13 @@ local function pushLog(level, ...)
str = str .. '\n' .. debugTraceBack(nil, 3)
end
local info = debugGetInfo(3, 'Sl')
- return m.raw(0, level, str, info.source, info.currentline, monotonic())
+ local text = m.raw(0, level, str, info.source, info.currentline, monotonic())
+
+ if log.print then
+ print(text)
+ end
+
+ return text
end
function m.info(...)