From a8b6594af0f58f2e8d7d80362e23652ef8fc155f Mon Sep 17 00:00:00 2001 From: Romain Bignon Date: Thu, 30 Sep 2010 12:28:46 +0200 Subject: [PATCH] add help for logging command, and set it as a weboob command --- weboob/tools/application/repl.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/weboob/tools/application/repl.py b/weboob/tools/application/repl.py index de5e46c5..37b33520 100644 --- a/weboob/tools/application/repl.py +++ b/weboob/tools/application/repl.py @@ -70,7 +70,7 @@ class ReplApplication(Cmd, BaseApplication): 'Type "help" to display available commands.', '', )) - self.weboob_commands = ['backends', 'condition', 'count', 'formatter', 'select', 'quit'] + self.weboob_commands = ['backends', 'condition', 'count', 'formatter', 'logging', 'select', 'quit'] self.hidden_commands = set(['EOF']) option_parser = OptionParser(self.SYNOPSIS, version=self._get_optparse_version()) @@ -597,6 +597,15 @@ class ReplApplication(Cmd, BaseApplication): return choices def do_logging(self, line): + """ + logging [LEVEL] + + Set logging level. + + Availables: debug, info, warning, error. + * quiet is an alias for error + * default is an alias for warning + """ args = self.parseargs(line, 1, 0) levels = (('debug', logging.DEBUG), ('info', logging.INFO),