MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / start

Method start

atomic-cli/src/logging/mod.rs:122–134  ·  view source on GitHub ↗
(matches: &clap::ArgMatches)

Source from the content-addressed store, hash-verified

120
121impl CommandLog {
122 pub(crate) fn start(matches: &clap::ArgMatches) -> Self {
123 let span = tracing::info_span!("atomic", cmd = %command_path(matches)).entered();
124 let cwd = std::env::current_dir()
125 .map(|dir| dir.display().to_string())
126 .unwrap_or_default();
127 tracing::info!(
128 target: COMMAND_TARGET,
129 version = env!("CARGO_PKG_VERSION"),
130 cwd = %cwd,
131 "command started"
132 );
133 Self { _span: span }
134 }
135
136 /// Log the outcome. The span closes when `self` drops here, logging how
137 /// long the command took. URLs in the error lose their credentials.

Callers

nothing calls this directly

Calls 1

displayMethod · 0.80

Tested by

no test coverage detected