~jimbaker/pyjuju/debug-relation-hook-context

« back to all changes in this revision

Viewing changes to juju/control/debug_log.py

  • Committer: Clint Byrum
  • Date: 2012-04-12 22:53:42 UTC
  • mfrom: (494.15.1 fix-log-help)
  • Revision ID: clint@ubuntu.com-20120412225342-rvs7fxl4n513bnmm
[r=hazmat][f=964640] Adding a basic description of debug-log to online help and reordering log levels

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
def configure_subparser(subparsers):
18
18
    """Configure debug-log subcommand"""
19
 
    sub_parser = subparsers.add_parser("debug-log", help=command.__doc__)
 
19
    sub_parser = subparsers.add_parser("debug-log", help=command.__doc__,
 
20
                                description=debug_log.__doc__)
20
21
    sub_parser.add_argument(
21
22
        "-e", "--environment",
22
23
        help="juju environment to operate in.")
40
41
 
41
42
    sub_parser.add_argument(
42
43
        "-l", "--level", default="DEBUG",
43
 
        choices=("DEBUG", "INFO", "ERROR", "WARNING", "CRITICAL"),
 
44
        choices=["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"],
44
45
        help="Log level to show")
45
46
 
46
47
    sub_parser.add_argument(
67
68
 
68
69
@inlineCallbacks
69
70
def debug_log(config, environment, log, options):
 
71
    """ Enables a distributed log for all agents in the environment, and
 
72
        displays all log entries that have not been seen yet. """
70
73
    provider = environment.get_machine_provider()
71
74
    client = yield provider.connect()
72
75