Expand description
Logging and utility functions for isolation runners
Structs§
- LogHeader
Params - Log header parameters
Constants§
- FATAL_
MARKER_ TAIL_ BYTES - Number of trailing bytes scanned for a fatal marker. Wider than the footer
window: V8 prints a long native stack trace after
FATAL ERROR: Reached heap limit ..., which can push the marker well past 16 KiB from the end of the log (issue #165). The footer matcher stays anchored, so a wider window is safe for it too. - LOG_
TAIL_ BYTES - Number of trailing bytes scanned for the terminal log footer. The footer is
always appended at the very end of the log, so there is no reason to read
(potentially megabytes of) command output on every
--statuscall.
Functions§
- append_
log_ file - Append to a log file, creating its parent directory when needed.
- create_
log_ footer - Create log content footer
- create_
log_ header - Create log content header
- create_
log_ path - Create log file path
- create_
log_ path_ for_ execution - Create stable log file path for a specific execution UUID/session ID.
- create_
shell_ log_ footer_ snippet - generate_
log_ filename - Generate unique log filename
- get_
default_ docker_ image - Get the default Docker image based on the host operating system Returns an image that matches the current OS as closely as possible:
- get_
log_ dir - Get log directory from environment or use system temp
- get_
temp_ dir - Get a start-command temporary directory for sidecar files.
- get_
temp_ root - Root directory for start-command temporary files.
- get_
timestamp - Generate timestamp for logging
- read_
log_ tail - Read the last
bytesbytes of a file as (lossy) UTF-8 text. - read_
log_ tail_ from - Read only bytes at or after the current attempt boundary.
- read_
log_ tail_ range - Bound archived evidence by the next attempt’s start offset.
- shell_
quote - wrap_
command_ with_ log_ footer - write_
log_ file - Write log file