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

Method toggle_console_debug

keepercommander/cli.py:751–763  ·  view source on GitHub ↗

Toggle console debug on/off.

(self, batch_mode)

Source from the content-addressed store, hash-verified

749 return bool(has_extension or has_path_separator or looks_like_name)
750
751 def toggle_console_debug(self, batch_mode):
752 """Toggle console debug on/off."""
753 current = self.is_console_debug_on(batch_mode)
754 new_state = not current
755
756 self.set_console_debug(new_state, batch_mode)
757
758 if not self.has_file_logging():
759 level = logging.DEBUG if new_state else (logging.WARNING if batch_mode else logging.INFO)
760 self.logger.setLevel(level)
761
762 logging.info(f'Debug {"ON" if new_state else "OFF"}')
763 return new_state
764
765 def process_command(self, tokens, batch_mode):
766 """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