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

Method toggle_console_debug

keepercommander/cli.py:779–791  ·  view source on GitHub ↗

Toggle console debug on/off.

(self, batch_mode)

Source from the content-addressed store, hash-verified

777 return bool(has_extension or has_path_separator or looks_like_name)
778
779 def toggle_console_debug(self, batch_mode):
780 """Toggle console debug on/off."""
781 current = self.is_console_debug_on(batch_mode)
782 new_state = not current
783
784 self.set_console_debug(new_state, batch_mode)
785
786 if not self.has_file_logging():
787 level = logging.DEBUG if new_state else (logging.WARNING if batch_mode else logging.INFO)
788 self.logger.setLevel(level)
789
790 logging.info(f'Debug {"ON" if new_state else "OFF"}')
791 return new_state
792
793 def process_command(self, tokens, batch_mode):
794 """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