Skip to content

Commit a3900e8

Browse files
committed
add logs
1 parent 140dc03 commit a3900e8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

script/library.lua

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ local function initBuiltIn(uri)
218218
end
219219

220220
if scp:get('metaPath') == metaPath:string() then
221+
log.info('Has meta path, skip:', metaPath:string())
221222
return
222223
end
223224
scp:set('metaPath', metaPath:string())
@@ -227,12 +228,14 @@ local function initBuiltIn(uri)
227228
end
228229
end, log.error)
229230
if not suc then
231+
log.info('Init builtin failed.')
230232
return
231233
end
232234
local out = fsu.dummyFS()
233235
local templateDir = ROOT / 'meta' / 'template'
234236
for libName, status in pairs(define.BuiltIn) do
235237
status = config.get(uri, 'Lua.runtime.builtin')[libName] or status
238+
log.info('Builtin status:', libName, status)
236239
if status == 'disable' then
237240
goto CONTINUE
238241
end
@@ -247,7 +250,10 @@ local function initBuiltIn(uri)
247250
end
248251
::CONTINUE::
249252
end
250-
fsu.fileSync(out, metaPath)
253+
local result = fsu.fileSync(out, metaPath)
254+
if #result.err > 0 then
255+
log.warn('File sync error:', util.dump(result))
256+
end
251257
end
252258

253259
local function loadSingle3rdConfig(libraryDir)

0 commit comments

Comments
 (0)