Skip to main content

Module isolation_log

Module isolation_log 

Source
Expand description

Logging and utility functions for isolation runners

Structs§

LogHeaderParams
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 --status call.

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 bytes bytes 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