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

Method install_subscriber

crates/openshell-server/src/tracing_bus.rs:49–60  ·  view source on GitHub ↗

Install a tracing subscriber that logs to stdout and publishes events into this bus.

(&self, env_filter: EnvFilter)

Source from the content-addressed store, hash-verified

47
48 /// Install a tracing subscriber that logs to stdout and publishes events into this bus.
49 pub fn install_subscriber(&self, env_filter: EnvFilter) {
50 let layer = SandboxLogLayer {
51 bus: self.clone(),
52 default_tail: Self::DEFAULT_TAIL,
53 };
54
55 tracing_subscriber::registry()
56 .with(env_filter)
57 .with(tracing_subscriber::fmt::layer())
58 .with(layer)
59 .init();
60 }
61
62 fn sender_for(&self, sandbox_id: &str) -> broadcast::Sender<SandboxStreamEvent> {
63 let mut inner = self.inner.lock().expect("tracing bus lock poisoned");

Callers 1

run_from_argsFunction · 0.80

Calls 1

withMethod · 0.80

Tested by

no test coverage detected