|
1 | | -# Dart VM Service Protocol 3.17-dev |
| 1 | +# Dart VM Service Protocol 3.18-dev |
2 | 2 |
|
3 | 3 | > Please post feedback to the [observatory-discuss group][discuss-list] |
4 | 4 |
|
5 | | -This document describes of _version 3.17-dev_ of the Dart VM Service Protocol. This |
| 5 | +This document describes of _version 3.18-dev_ of the Dart VM Service Protocol. This |
6 | 6 | protocol is used to communicate with a running Dart Virtual Machine. |
7 | 7 |
|
8 | 8 | To use the Service Protocol, start the VM with the *--observe* flag. |
@@ -75,6 +75,7 @@ The Service Protocol uses [JSON-RPC 2.0][]. |
75 | 75 | - [Isolate](#isolate) |
76 | 76 | - [Library](#library) |
77 | 77 | - [LibraryDependency](#librarydependency) |
| 78 | + - [LogRecord](#logrecord) |
78 | 79 | - [MapAssociation](#mapassociation) |
79 | 80 | - [MemoryUsage](#memoryusage) |
80 | 81 | - [Message](#message) |
@@ -546,7 +547,7 @@ instance members, class members and top-level members. |
546 | 547 | If _disableBreakpoints_ is provided and set to true, any breakpoints hit as a |
547 | 548 | result of this evaluation are ignored. Defaults to false if not provided. |
548 | 549 |
|
549 | | -If expression is failed to parse and compile, then [rpc error](#rpc-error) 113 |
| 550 | +If the expression fails to parse and compile, then [rpc error](#rpc-error) 113 |
550 | 551 | "Expression compilation error" is returned. |
551 | 552 |
|
552 | 553 | If an error occurs while evaluating the expression, an [@Error](#error) |
@@ -579,7 +580,7 @@ members, parameters and locals. |
579 | 580 | If _disableBreakpoints_ is provided and set to true, any breakpoints hit as a |
580 | 581 | result of this evaluation are ignored. Defaults to false if not provided. |
581 | 582 |
|
582 | | -If expression is failed to parse and compile, then [rpc error](#rpc-error) 113 |
| 583 | +If the expression fails to parse and compile, then [rpc error](#rpc-error) 113 |
583 | 584 | "Expression compilation error" is returned. |
584 | 585 |
|
585 | 586 | If an error occurs while evaluating the expression, an [@Error](#error) |
@@ -947,6 +948,7 @@ Debug | PauseStart, PauseExit, PauseBreakpoint, PauseInterrupted, PauseException |
947 | 948 | GC | GC |
948 | 949 | Extension | Extension |
949 | 950 | Timeline | TimelineEvents |
| 951 | +Logging | Logging |
950 | 952 |
|
951 | 953 | Additionally, some embedders provide the _Stdout_ and _Stderr_ |
952 | 954 | streams. These streams allow the client to subscribe to writes to |
@@ -1424,6 +1426,11 @@ class Event extends Response { |
1424 | 1426 | // IsolateReloaded |
1425 | 1427 | // IsolateSpawn |
1426 | 1428 | string status [optional]; |
| 1429 | +
|
| 1430 | + // LogRecord data. |
| 1431 | + // |
| 1432 | + // This is provided for the Logging event. |
| 1433 | + LogRecord logRecord [optional]; |
1427 | 1434 | } |
1428 | 1435 | ``` |
1429 | 1436 |
|
@@ -1506,6 +1513,9 @@ enum EventKind { |
1506 | 1513 |
|
1507 | 1514 | // Event from dart:developer.postEvent. |
1508 | 1515 | Extension |
| 1516 | +
|
| 1517 | + // Event from dart:developer.log. |
| 1518 | + Logging |
1509 | 1519 | } |
1510 | 1520 | ``` |
1511 | 1521 |
|
@@ -2214,6 +2224,39 @@ class LibraryDependency { |
2214 | 2224 |
|
2215 | 2225 | A _LibraryDependency_ provides information about an import or export. |
2216 | 2226 |
|
| 2227 | +### LogRecord |
| 2228 | + |
| 2229 | +``` |
| 2230 | +class LogRecord extends Response { |
| 2231 | + // The log message. |
| 2232 | + @Instance message; |
| 2233 | +
|
| 2234 | + // The timestamp. |
| 2235 | + int time; |
| 2236 | +
|
| 2237 | + // The severity level (a value between 0 and 2000). |
| 2238 | + // |
| 2239 | + // See the package:logging `Level` class for an overview of the possible |
| 2240 | + // values. |
| 2241 | + int level; |
| 2242 | +
|
| 2243 | + // A monotonically increasing sequence number. |
| 2244 | + int sequenceNumber; |
| 2245 | +
|
| 2246 | + // The name of the source of the log message. |
| 2247 | + @Instance loggerName; |
| 2248 | +
|
| 2249 | + // The zone where the log was emitted. |
| 2250 | + @Instance zone; |
| 2251 | +
|
| 2252 | + // An error object associated with this log event. |
| 2253 | + @Instance error; |
| 2254 | +
|
| 2255 | + // A stack trace associated with this log event. |
| 2256 | + @Instance stackTrace; |
| 2257 | +} |
| 2258 | +``` |
| 2259 | + |
2217 | 2260 | ### MapAssociation |
2218 | 2261 |
|
2219 | 2262 | ``` |
@@ -2811,5 +2854,6 @@ version | comments |
2811 | 2854 | 3.14 | Flag 'profile_period' can now be set at runtime, allowing for the profiler sample rate to be changed while the program is running. |
2812 | 2855 | 3.15 | Added `disableBreakpoints` parameter to `invoke`, `evaluate`, and `evaluateInFrame`. |
2813 | 2856 | 3.16 | Add 'getMemoryUsage' RPC and 'MemoryUsage' object. |
| 2857 | +3.17 | Add 'Logging' event kind and the LogRecord class. |
2814 | 2858 |
|
2815 | 2859 | [discuss-list]: https://groups.google.com/a/dartlang.org/forum/#!forum/observatory-discuss |
0 commit comments