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 // Patch file for dart:developer library. | 5 // Patch file for dart:developer library. |
6 | 6 |
7 import 'dart:_js_helper' show patch; | 7 import 'dart:_js_helper' show patch; |
8 import 'dart:_foreign_helper' show JS; | 8 import 'dart:_foreign_helper' show JS; |
9 | 9 |
10 /// If [when] is true, stop the program as if a breakpoint where hit at the | 10 /// If [when] is true, stop the program as if a breakpoint where hit at the |
(...skipping 12 matching lines...) Expand all Loading... |
23 } | 23 } |
24 return when; | 24 return when; |
25 } | 25 } |
26 | 26 |
27 /// Send a reference to [object] to any attached debuggers so they may open an | 27 /// Send a reference to [object] to any attached debuggers so they may open an |
28 /// inspector on the object. Returns the argument. | 28 /// inspector on the object. Returns the argument. |
29 @patch | 29 @patch |
30 inspect(object) { | 30 inspect(object) { |
31 return object; | 31 return object; |
32 } | 32 } |
| 33 |
| 34 @patch |
| 35 /// Emit a log event. |
| 36 /// [sequenceNumber] is a monotonically increasing sequence number. |
| 37 /// [millisececondsSinceEpoch] is a timestamp. |
| 38 /// [level] is the severity level (value between 0 and 2000 inclusive). |
| 39 /// [name] is the name of the source of the log message. |
| 40 /// [message] is the log message. |
| 41 /// [zone] (optional) the zone where the log was emitted |
| 42 /// [error] (optional) an error object associated with this log event. |
| 43 /// [stackTrace] (optional) a stack trace associated with this log event. |
| 44 log(int sequenceNumber, |
| 45 int millisecondsSinceEpoch, |
| 46 int level, |
| 47 String name, |
| 48 String message, |
| 49 [Zone zone, |
| 50 Object error, |
| 51 StackTrace stackTrace]) { |
| 52 // TODO. |
| 53 } |
OLD | NEW |