MCPcopy Create free account
hub / github.com/Keeper-Security/Commander / toggle_console_debug

Method toggle_console_debug

keepercommander/cli.py:654–666  ·  view source on GitHub ↗

Toggle console debug on/off.

(self, batch_mode)

Source from the content-addressed store, hash-verified

652 return bool(has_extension or has_path_separator or looks_like_name)
653
654 def toggle_console_debug(self, batch_mode):
655 """Toggle console debug on/off."""
656 current = self.is_console_debug_on(batch_mode)
657 new_state = not current
658
659 self.set_console_debug(new_state, batch_mode)
660
661 if not self.has_file_logging():
662 level = logging.DEBUG if new_state else (logging.WARNING if batch_mode else logging.INFO)
663 self.logger.setLevel(level)
664
665 logging.info(f'Debug {"ON" if new_state else "OFF"}')
666 return new_state
667
668 def process_command(self, tokens, batch_mode):
669 """Process debug command."""

Callers 1

process_commandMethod · 0.95

Calls 4

is_console_debug_onMethod · 0.95
set_console_debugMethod · 0.95
has_file_loggingMethod · 0.95
infoMethod · 0.45

Tested by

no test coverage detected