| Index: pkg/analysis_server/lib/src/channel/web_socket_channel.dart
|
| diff --git a/pkg/analysis_server/lib/src/channel/web_socket_channel.dart b/pkg/analysis_server/lib/src/channel/web_socket_channel.dart
|
| index 8dfcb5c552ff294ac1871a1ec676217f3e2bee8c..dce402e91fd61ba6b65d2bf072afda36b5ace170 100644
|
| --- a/pkg/analysis_server/lib/src/channel/web_socket_channel.dart
|
| +++ b/pkg/analysis_server/lib/src/channel/web_socket_channel.dart
|
| @@ -10,6 +10,7 @@ import 'dart:io';
|
|
|
| import 'package:analysis_server/src/channel/channel.dart';
|
| import 'package:analysis_server/src/protocol.dart';
|
| +import 'package:analyzer/instrumentation/instrumentation.dart';
|
|
|
|
|
| /**
|
| @@ -72,9 +73,14 @@ class WebSocketServerChannel implements ServerCommunicationChannel {
|
| final WebSocket socket;
|
|
|
| /**
|
| + * The instrumentation server that is to be used by this analysis server.
|
| + */
|
| + final InstrumentationServer instrumentationServer;
|
| +
|
| + /**
|
| * Initialize a newly create [WebSocket] wrapper to wrap the given [socket].
|
| */
|
| - WebSocketServerChannel(this.socket);
|
| + WebSocketServerChannel(this.socket, this.instrumentationServer);
|
|
|
| @override
|
| void close() {
|
| @@ -96,6 +102,7 @@ class WebSocketServerChannel implements ServerCommunicationChannel {
|
| */
|
| void readRequest(Object data, void onRequest(Request request)) {
|
| if (data is String) {
|
| + instrumentationServer.log(data);
|
| // Parse the string as a JSON descriptor and process the resulting
|
| // structure as a request.
|
| ServerCommunicationChannel.FromJson.start();
|
| @@ -120,6 +127,7 @@ class WebSocketServerChannel implements ServerCommunicationChannel {
|
| String jsonEncoding = JSON.encode(notification.toJson());
|
| ServerCommunicationChannel.ToJson.stop();
|
| socket.add(jsonEncoding);
|
| + instrumentationServer.log(jsonEncoding);
|
| }
|
|
|
| @override
|
| @@ -128,5 +136,6 @@ class WebSocketServerChannel implements ServerCommunicationChannel {
|
| String jsonEncoding = JSON.encode(response.toJson());
|
| ServerCommunicationChannel.ToJson.stop();
|
| socket.add(jsonEncoding);
|
| + instrumentationServer.log(jsonEncoding);
|
| }
|
| }
|
|
|