diff --git a/guides/security-sandbox.md b/guides/security-sandbox.md index b42d3da..ffde967 100644 --- a/guides/security-sandbox.md +++ b/guides/security-sandbox.md @@ -16,8 +16,9 @@ script cannot reach them: - **Package machinery:** the entire `package` library, plus the default `require` - **Unstructured logging:** `print`, `eprint` — Luerl's defaults bypass - the structured logger and write straight to BEAM stdout. Scripts that - need to log should go through the asobi-side `game.log` API. + the structured logger and write straight to BEAM stdout. There is + currently no in-script logging API; surface diagnostics through game + state or broadcast events instead. `os.clock`, `os.date`, `os.difftime`, and `os.time` remain available so games can timestamp. diff --git a/src/lua/asobi_lua_loader.erl b/src/lua/asobi_lua_loader.erl index bac5545..6493065 100644 --- a/src/lua/asobi_lua_loader.erl +++ b/src/lua/asobi_lua_loader.erl @@ -219,8 +219,9 @@ strip_dangerous_globals(St) -> %% L-1: `print` and `eprint` are stripped here because Luerl's %% defaults call `io:format` directly to the BEAM stdout, which %% breaks the structured JSON log stream and lets a tight loop - %% flood the runtime's logging driver. Scripts that need to log - %% should go through the asobi-side `game.log` API. + %% flood the runtime's logging driver. There is currently no + %% in-script logging API; scripts surface diagnostics through game + %% state or broadcast events. Paths = [ [~"os", ~"execute"], [~"os", ~"exit"],