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

Function file_directives

atomic-cli/src/logging/mod.rs:213–219  ·  view source on GitHub ↗

The file's filter from `ATOMIC_LOG`, or `None` when it is `off`.

(atomic_log: Option<String>)

Source from the content-addressed store, hash-verified

211
212/// The file's filter from `ATOMIC_LOG`, or `None` when it is `off`.
213fn file_directives(atomic_log: Option<String>) -> Option<String> {
214 match atomic_log.map(|value| value.trim().to_string()) {
215 Some(value) if value.eq_ignore_ascii_case("off") => None,
216 Some(value) if !value.is_empty() => Some(value),
217 _ => Some(FILE_FILTER.to_string()),
218 }
219}
220
221/// Where the log file goes, and whether the user chose it.
222#[derive(Debug, PartialEq, Eq)]

Callers 1

file_settingsFunction · 0.85

Calls 1

is_emptyMethod · 0.45

Tested by

no test coverage detected