OLD | NEW |
---|---|
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 /// Interact with developer tools such as the debugger and inspector. | 5 /// Interact with developer tools such as the debugger and inspector. |
6 /// | 6 /// |
7 /// The dart:developer library is _unstable_ and its API might change slightly | 7 /// The dart:developer library is _unstable_ and its API might change slightly |
8 /// as a result of developer feedback. This library is platform dependent and | 8 /// as a result of developer feedback. This library is platform dependent and |
9 /// therefore it has implementations for both dart2js and the Dart VM. Both are | 9 /// therefore it has implementations for both dart2js and the Dart VM. Both are |
10 /// under development and may not support all operations yet. | 10 /// under development and may not support all operations yet. |
(...skipping 17 matching lines...) Expand all Loading... | |
28 /// JavaScript, this uses the "debugger" statement, and behaves exactly as | 28 /// JavaScript, this uses the "debugger" statement, and behaves exactly as |
29 /// that does. | 29 /// that does. |
30 external bool debugger({bool when: true, String msg}); | 30 external bool debugger({bool when: true, String msg}); |
31 | 31 |
32 /// Send a reference to [object] to any attached debuggers. | 32 /// Send a reference to [object] to any attached debuggers. |
33 /// | 33 /// |
34 /// Debuggers may open an inspector on the object. Returns the argument. | 34 /// Debuggers may open an inspector on the object. Returns the argument. |
35 external inspect(object); | 35 external inspect(object); |
36 | 36 |
37 /// Emit a log event. | 37 /// Emit a log event. |
38 /// [sequenceNumber] is a monotonically increasing sequence number. | |
39 /// [millisececondsSinceEpoch] is a timestamp. | |
40 /// [level] is the severity level (value between 0 and 2000 inclusive). | |
41 /// [name] is the name of the source of the log message. | |
42 /// [message] is the log message. | 38 /// [message] is the log message. |
39 /// [time] is the timestamp. | |
40 /// [sequenceNumber] (optional) is a monotonically increasing sequence number. | |
41 /// [level] (optional) is the severity level (value between 0 and 2000). | |
42 /// [name] (optional) is the name of the source of the log message. | |
43 /// [zone] (optional) the zone where the log was emitted | 43 /// [zone] (optional) the zone where the log was emitted |
44 /// [error] (optional) an error object associated with this log event. | 44 /// [error] (optional) an error object associated with this log event. |
45 /// [stackTrace] (optional) a stack trace associated with this log event. | 45 /// [stackTrace] (optional) a stack trace associated with this log event. |
46 external log({int sequenceNumber, | 46 external log(String message, |
47 int millisecondsSinceEpoch, | 47 DateTime time, |
Lasse Reichstein Nielsen
2015/08/04 11:24:54
Could/should we make time optional, and have it de
Cutch
2015/08/04 14:11:40
Done.
| |
48 int level, | 48 {int sequenceNumber, |
49 String name, | 49 int level: 0, |
50 String message, | 50 String name:'', |
Lasse Reichstein Nielsen
2015/08/04 11:24:54
space after ':'.
Cutch
2015/08/04 14:11:40
Done.
| |
51 Zone zone, | 51 Zone zone, |
52 Object error, | 52 Object error, |
53 StackTrace stackTrace}); | 53 StackTrace stackTrace}); |
OLD | NEW |