anchor.diff:        'location.\n'
         '\n'
         'Syntax: step\n';
  +}
  +
  +class LogCommand extends DebuggerCommand {
  +  LogCommand(Debugger debugger) : super(debugger, 'log', []);
  +
  +  Future run(List<String> args) async {
  +    if (args.length == 0) {
  +      debugger.console.print(
  +          'Current log level: '
  +          '${debugger._consolePrinter._minimumLogLevel.name}');
  +      return new Future.value(null);
  +    }
  +    if (args.length > 1) {
  +      debugger.console.print("log expects zero or one arguments");
  +      return new Future.value(null);
  +    }
  +    var level = _findLevel(args[0]);
  +    if (level == null) {
  +      debugger.console.print('No such log level: ${args[0]}');
  +      return new Future.value(null);
  +    }
  +    debugger._consolePrinter._minimumLogLevel = level;
  +    debugger.console.print('Set log level to: ${level.name}');
  +    return new Future.value(null);
  +  }
  +
  +  Level _findLevel(String levelName) {
  +    levelName = levelName.toUpperCase();
  +    for (var level in Level.LEVELS) {
  +      if (level.name == levelName) {
  +        return level;
  +      }
  +    }
  +    return null;
  +  }
  +
  +  Future<List<String>> complete(List<String> args) {
  +    if (args.length != 1) {
  +      return new Future.value([args.join('')]);
  +    }
  +    var prefix = args[0].toUpperCase();
  +    var result = <String>[];
  +    for (var level in Level.LEVELS) {
  +      if (level.name.startsWith(prefix)) {
  +        result.add(level.name);
  +      }
  +    }
  +    return new Future.value(result);
  +  }
  +
  +  String helpShort =
  +      'Control which log messages are displayed';
  +
  +  String helpLong =
  +      'Get or set the minimum log level that should be displayed.\n'
  +      '\n'
  +      'Log levels (in ascending order): ALL, FINEST, FINER, FINE, CONFIG, '
  +      'INFO, WARNING, SEVERE, SHOUT, OFF\n'
  +      '\n'
  +      'Default: OFF\n'
  +      '\n'
  +      'Syntax: log          '
  +      '# Display the current minimum log level.\n'
  +      '        log <level>  '
  +      '# Set the minimum log level to <level>.\n'
  +      '        log OFF      '
  +      '# Display no log messages.\n'
  +      '        log ALL      '
  +      '# Display all log messages.\n';
   }
   
   class AsyncNextCommand extends DebuggerCommand {
  
positive.code: import 'package:observatory/cli.dart';
  import 'package:observatory/debugger.dart';
  import 'package:observatory/service.dart';
  import 'package:polymer/polymer.dart';
  
  // TODO(turnidge): Move Debugger, DebuggerCommand to debugger library.
  
negative.code:     _stdoutSubscriptionFuture = null;
      cancelFutureSubscription(_stderrSubscriptionFuture);
      _stderrSubscriptionFuture = null;
      cancelFutureSubscription(_logSubscriptionFuture);
      _logSubscriptionFuture = null;
      super.detached();
    }
  }
  