MCPcopy Create free account
hub / github.com/aws/amazon-q-developer-cli / get_log_level

Function get_log_level

crates/chat-cli/src/logging.rs:194–200  ·  view source on GitHub ↗

Get the current log level by first seeing if it is set in application, then environment, then otherwise using the default # Returns Returns a string identifying the current log level.

()

Source from the content-addressed store, hash-verified

192///
193/// Returns a string identifying the current log level.
194pub fn get_log_level() -> String {
195 Q_LOG_LEVEL_GLOBAL
196 .lock()
197 .unwrap()
198 .clone()
199 .unwrap_or_else(|| get_env_log_level(&crate::os::Env::new()).unwrap_or_else(|_| DEFAULT_FILTER.to_string()))
200}
201
202/// Set the log level to the given level.
203///

Callers 1

set_log_levelFunction · 0.70

Calls 2

to_stringMethod · 0.80
cloneMethod · 0.45

Tested by

no test coverage detected