1
0
mirror of https://github.com/Adorable-Catgirl/Zorya-NEO.git synced 2024-11-30 22:28:06 +11:00
Zorya-NEO/mods/util_log2disk/init.lua

15 lines
362 B
Lua
Raw Normal View History

2020-03-13 08:01:05 +11:00
local vdev = krequire("util_vcomponent")
local utils = krequire("utils")
local component = component
return function(fs, file)
local px = component.proxy(fs)
local fh = px.open(file, "w")
utils.debug_log("test")
vdev.register("vdev-ZY_LOG2FILE", "sandbox", {
log = function(...)
px.write(fh, table.concat({...}, " ").."\n")
end
})
return true
end