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

Function get_log_level_max

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

Get the current max log level # Returns The max log level which is set every time the log level is set.

()

Source from the content-addressed store, hash-verified

229///
230/// The max log level which is set every time the log level is set.
231pub fn get_log_level_max() -> LevelFilter {
232 let max_level = *MAX_LEVEL.lock().unwrap();
233 match max_level {
234 Some(level) => level,
235 None => {
236 let filter_layer = create_filter_layer();
237 *MAX_LEVEL.lock().unwrap() = filter_layer.max_level_hint();
238 filter_layer.max_level_hint().unwrap_or(DEFAULT_FILTER)
239 },
240 }
241}
242
243fn create_filter_layer() -> EnvFilter {
244 let directive = Directive::from(DEFAULT_FILTER);

Callers 1

mainFunction · 0.85

Calls 1

create_filter_layerFunction · 0.85

Tested by

no test coverage detected