MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / sandbox_log_level

Function sandbox_log_level

crates/openshell-core/src/driver_utils.rs:119–127  ·  view source on GitHub ↗

Return the effective log level for a sandbox. Uses the level from the sandbox spec when non-empty, falling back to `default_level` otherwise.

(sandbox: &DriverSandbox, default_level: &str)

Source from the content-addressed store, hash-verified

117/// Uses the level from the sandbox spec when non-empty, falling back to
118/// `default_level` otherwise.
119pub fn sandbox_log_level(sandbox: &DriverSandbox, default_level: &str) -> String {
120 sandbox
121 .spec
122 .as_ref()
123 .map(|spec| spec.log_level.as_str())
124 .filter(|level| !level.is_empty())
125 .unwrap_or(default_level)
126 .to_string()
127}
128
129// ---------------------------------------------------------------------------
130// Supervisor image helpers (shared by Docker and Podman drivers)

Callers 2

build_environmentFunction · 0.85
build_guest_environmentFunction · 0.85

Calls 2

as_strMethod · 0.45
is_emptyMethod · 0.45

Tested by

no test coverage detected