def run(ctx): """Admin commands.""" cli.init_logger('admin.json') log_level = logging.WARN if ctx.obj.get('logging.debug'): log_level = logging.DEBUG tl.set_log_level(log_level)
def run(ctx, outfmt, debug): """Treadmill CLI.""" ctx.obj = {} ctx.obj['logging.debug'] = False if outfmt: cli.OUTPUT_FORMAT = outfmt # Default logging to cli.json, at CRITICAL, unless --debug cli.init_logger('cli.json') if debug: ctx.obj['logging.debug'] = True tl.set_log_level(logging.DEBUG)
def run(ctx, cgroup, logging_conf): """Run system processes""" # Default logging to daemon.conf, at CRITICAL, unless --debug cli.init_logger(logging_conf) log_level = None if ctx.obj.get('logging.debug'): log_level = logging.DEBUG else: log_level = logging.DEBUG tl.set_log_level(log_level) if cgroup: _configure_service_cgroups(cgroup)