logging

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package logging provides shared logger configuration for snapshot binaries.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigureLogger

func ConfigureLogger(output string) logr.Logger

ConfigureLogger creates a logr.Logger from the SNAPSHOT_LOG_LEVEL environment variable. output controls where log lines are written ("stdout" or "stderr"). Supported levels: trace, debug, info, warn, error. Defaults to info.

func LastRestoreError added in v0.2.0

func LastRestoreError(checkpointPath, workDir string) string

LastRestoreError returns the last error CRIU logged in restore.log, or "" when there is none. CRIU's RPC response carries the first error it logged instead, which is often an earlier, non-fatal one.

func LogProcessDiagnostics

func LogProcessDiagnostics(procRoot string, pid int, restoreLogPath string, log logr.Logger)

LogProcessDiagnostics logs process state and CRIU restore log for debugging a failed restore.

func LogRestoreErrors

func LogRestoreErrors(checkpointPath, workDir string, log logr.Logger)

LogRestoreErrors finds the CRIU restore.log and logs key lines from it.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL