Setting('logger_hooke', 'qualname', 'hooke'),
Setting('handler_hand1', help='Configure the default log handler, see\nhttp://docs.python.org/library/logging.html#configuration-file-format', wrap=False),
Setting('handler_hand1', 'class', 'StreamHandler'),
- Setting('handler_hand1', 'level', 'WARN'), #NOTSET'),
+ Setting('handler_hand1', 'level', 'WARN'),
Setting('handler_hand1', 'formatter', 'form1'),
Setting('handler_hand1', 'args', '(sys.stderr,)'),
Setting('formatter_form1', help='Configure the default log formatter, see\nhttp://docs.python.org/library/logging.html#configuration-file-format', wrap=False),
'engine closing, placed hooke instance in return queue')
break
assert isinstance(msg, CommandMessage), type(msg)
- log.debug('engine running %s' % msg.command.name)
+ log.debug('engine running %s with %s'
+ % (msg.command.name, msg.arguments))
msg.command.run(hooke, ui_to_command_queue, command_to_ui_queue,
**msg.arguments)
communication queues, so make sure they will not need user
interaction.
"""
+ log.debug('engine running internal %s with %s'
+ % (command.name, arguments))
command.run(hooke, NullQueue(), NullQueue(), arguments)
'--command-no-exit', dest='command_exit',
action='store_false', default=True,
help="Don't exit after running a script or commands.")
+ p.add_option(
+ '--debug', dest='debug', action='store_true', default=False,
+ help="Enable debug logging.")
options,arguments = p.parse_args()
if len(arguments) > 0:
print >> sys.stderr, 'More than 0 arguments to %s: %s' \
if options.version == True:
print version()
sys.exit(0)
+ if options.debug == True:
+ hooke.config.set(
+ section='handler_hand1', option='level', value='NOTSET')
+ hooke.load_log()
if options.script != None:
with open(os.path.expanduser(options.script), 'r') as f:
options.commands.extend(f.readlines())