Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions guides/security-sandbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
5 changes: 3 additions & 2 deletions src/lua/asobi_lua_loader.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down
Loading