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

Side by Side Diff: pkg/analyzer/lib/instrumentation/instrumentation.dart

Issue 1322513004: Reformat code to reduce churn (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 library instrumentation; 5 library instrumentation;
6 6
7 import 'dart:convert'; 7 import 'dart:convert';
8 8
9 import 'package:analyzer/task/model.dart'; 9 import 'package:analyzer/task/model.dart';
10 10
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 _instrumentationServer 143 _instrumentationServer
144 .log(_join([TAG_FILE_READ, path, timeStamp, content])); 144 .log(_join([TAG_FILE_READ, path, timeStamp, content]));
145 } 145 }
146 } 146 }
147 147
148 /** 148 /**
149 * Log that a log entry that was written to the analysis engine's log. The log 149 * Log that a log entry that was written to the analysis engine's log. The log
150 * entry has the given [level] and [message], and was created at the given 150 * entry has the given [level] and [message], and was created at the given
151 * [time]. 151 * [time].
152 */ 152 */
153 void logLogEntry(String level, DateTime time, String message, Object exception , StackTrace stackTrace) { 153 void logLogEntry(String level, DateTime time, String message,
154 Object exception, StackTrace stackTrace) {
154 if (_instrumentationServer != null) { 155 if (_instrumentationServer != null) {
155 String timeStamp = 156 String timeStamp =
156 time == null ? 'null' : time.millisecondsSinceEpoch.toString(); 157 time == null ? 'null' : time.millisecondsSinceEpoch.toString();
157 String exceptionText = exception.toString(); 158 String exceptionText = exception.toString();
158 String stackTraceText = stackTrace.toString(); 159 String stackTraceText = stackTrace.toString();
159 _instrumentationServer 160 _instrumentationServer.log(_join([
160 .log(_join([TAG_LOG_ENTRY, level, timeStamp, message, exceptionText, s tackTraceText])); 161 TAG_LOG_ENTRY,
162 level,
163 timeStamp,
164 message,
165 exceptionText,
166 stackTraceText
167 ]));
161 } 168 }
162 } 169 }
163 170
164 /** 171 /**
165 * Log that a notification has been sent to the client. 172 * Log that a notification has been sent to the client.
166 */ 173 */
167 void logNotification(String notification) { 174 void logNotification(String notification) {
168 _log(TAG_NOTIFICATION, notification); 175 _log(TAG_NOTIFICATION, notification);
169 } 176 }
170 177
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 } 372 }
366 } 373 }
367 374
368 @override 375 @override
369 void shutdown() { 376 void shutdown() {
370 for (InstrumentationServer server in _servers) { 377 for (InstrumentationServer server in _servers) {
371 server.shutdown(); 378 server.shutdown();
372 } 379 }
373 } 380 }
374 } 381 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/file_system/physical_file_system.dart ('k') | pkg/analyzer/lib/plugin/options.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698