37ed87b038
Port the service tests and Observatory to Dart 3. Change-Id: I8a8b20d8f90acd3b5f741c93f10ba99971aa0c52 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154825 Commit-Queue: Ryan Macnak <rmacnak@google.com> Reviewed-by: Ben Konyi <bkonyi@google.com>
21 lines
722 B
Dart
21 lines
722 B
Dart
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
import 'dart:html';
|
|
import 'package:logging/logging.dart';
|
|
import 'package:observatory/elements.dart';
|
|
import 'package:stack_trace/stack_trace.dart';
|
|
|
|
main() async {
|
|
Chain.capture(() async {
|
|
Logger.root.level = Level.INFO;
|
|
Logger.root.onRecord.listen((LogRecord rec) {
|
|
print('${rec.level.name}: ${rec.time}: ${rec.message}');
|
|
});
|
|
Logger.root.info('Starting Observatory');
|
|
document.body!.children
|
|
.insert(0, new ObservatoryApplicationElement.created().element);
|
|
});
|
|
}
|