Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(608)

Unified Diff: sdk/lib/_internal/js_runtime/lib/developer_patch.dart

Issue 1266053003: Make dart:developer log more user friendly (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/observatory/tests/ui/log.dart ('k') | sdk/lib/developer/developer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/js_runtime/lib/developer_patch.dart
diff --git a/sdk/lib/_internal/js_runtime/lib/developer_patch.dart b/sdk/lib/_internal/js_runtime/lib/developer_patch.dart
index b316f250c9e9a7bf1f5e9601d005fe3fca19aed4..4f06174d37d9bd48c068ef01b304081045dec19e 100644
--- a/sdk/lib/_internal/js_runtime/lib/developer_patch.dart
+++ b/sdk/lib/_internal/js_runtime/lib/developer_patch.dart
@@ -7,14 +7,6 @@
import 'dart:_js_helper' show patch;
import 'dart:_foreign_helper' show JS;
-/// If [when] is true, stop the program as if a breakpoint where hit at the
-/// following statement. Returns the value of [when]. Some debuggers may
-/// display [msg].
-/// NOTE: When invoked, the isolate will not return until a debugger
-/// continues execution. When running in the Dart VM the behaviour is the same
-/// regardless of whether or not a debugger is connected. When compiled to
-/// JavaScript, this uses the "debugger" statement, and behaves exactly as
-/// that does.
@patch
@ForceInline()
bool debugger({bool when: true, String message}) {
@@ -24,28 +16,17 @@ bool debugger({bool when: true, String message}) {
return when;
}
-/// Send a reference to [object] to any attached debuggers so they may open an
-/// inspector on the object. Returns the argument.
@patch
Object inspect(Object object) {
return object;
}
@patch
-/// Emit a log event.
-/// [sequenceNumber] is a monotonically increasing sequence number.
-/// [millisececondsSinceEpoch] is a timestamp.
-/// [level] is the severity level (value between 0 and 2000 inclusive).
-/// [name] is the name of the source of the log message.
-/// [message] is the log message.
-/// [zone] (optional) the zone where the log was emitted
-/// [error] (optional) an error object associated with this log event.
-/// [stackTrace] (optional) a stack trace associated with this log event.
-log({int sequenceNumber,
- int millisecondsSinceEpoch,
- int level,
- String name,
- String message,
+log(String message,
+ {DateTime time,
+ int sequenceNumber,
+ int level: 0,
+ String name: '',
Zone zone,
Object error,
StackTrace stackTrace}) {
« no previous file with comments | « runtime/observatory/tests/ui/log.dart ('k') | sdk/lib/developer/developer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698