add log module

This commit is contained in:
Meo597
2026-09-26 14:40:15 +08:00
parent 9628003594
commit 219f758060
4 changed files with 127 additions and 1 deletions
+2
View File
@@ -6,6 +6,7 @@ import (
"github.com/xtls/xray-core/common/errors"
"github.com/xtls/xray-core/common/geodata"
"github.com/xtls/xray-core/common/log"
luamgr "github.com/xtls/xray-core/common/lua"
"github.com/xtls/xray-core/common/net"
"github.com/xtls/xray-core/features/dns"
@@ -30,6 +31,7 @@ func newScriptEngine(path string, server *DNS) (*scriptEngine, error) {
defer cancel()
L, err := program.NewState(initCtx, func(L *lua.LState) {
geodata.RegisterLua(L)
log.RegisterLua(L)
server.RegisterLua(L)
})
if err != nil {