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

Function make_log

crates/openshell-tui/src/ui/sandbox_logs.rs:429–441  ·  view source on GitHub ↗
(message: &str, fields: Vec<(&str, &str)>)

Source from the content-addressed store, hash-verified

427 use std::collections::HashMap;
428
429 fn make_log(message: &str, fields: Vec<(&str, &str)>) -> LogLine {
430 LogLine {
431 timestamp_ms: 1_700_000_000_000, // 2023-11-14 22:13:20 UTC
432 level: "INFO".to_string(),
433 source: "sandbox".to_string(),
434 target: "test".to_string(),
435 message: message.to_string(),
436 fields: fields
437 .into_iter()
438 .map(|(k, v)| (k.to_string(), v.to_string()))
439 .collect(),
440 }
441 }
442
443 #[test]
444 fn plain_format_basic_line() {

Calls

no outgoing calls