OCDocker.Workbench.Logs module¶
Bounded read-only log preview helpers for Workbench run manifests.
- OCDocker.Workbench.Logs.build_log_file_preview(base_path, path, *, lines=80, max_bytes=65536, encoding='utf-8')[source]¶
Build a bounded preview for one log file, absolute or manifest-relative.
- Parameters:
base_path (pathlib.Path) – Directory used for relative log paths.
path (pathlib.Path) – Declared log path.
lines (int) – Maximum returned lines.
max_bytes (int) – Maximum bytes read from the end of the file.
encoding (str) – Text encoding used to decode log bytes.
- Returns:
Read-only log file preview.
- Return type:
RunLogFilePreview
- OCDocker.Workbench.Logs.preview_run_logs(target, *, lines=80, max_bytes=65536, encoding='utf-8')[source]¶
Preview declared Workbench run logs without streaming or controlling runs.
- Parameters:
target (str or pathlib.Path) – Run manifest file or prepared bundle directory.
lines (int) – Maximum returned lines per declared log file.
max_bytes (int) – Maximum bytes read from the end of each log file.
encoding (str) – Text encoding used to decode log bytes.
- Returns:
Read-only bounded log preview.
- Return type:
RunLogPreview