Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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) { | 153 void logLogEntry(String level, DateTime time, String message, Object exception , StackTrace stackTrace) { |
|
lukechurch
2015/08/03 13:36:14
This feels a bit strange to me - why are the excep
Brian Wilkerson
2015/08/03 14:07:40
This is only called from the logger, and it didn't
| |
| 154 if (_instrumentationServer != null) { | 154 if (_instrumentationServer != null) { |
| 155 String timeStamp = | 155 String timeStamp = |
| 156 time == null ? 'null' : time.millisecondsSinceEpoch.toString(); | 156 time == null ? 'null' : time.millisecondsSinceEpoch.toString(); |
| 157 String exceptionText = exception.toString(); | |
| 158 String stackTraceText = stackTrace.toString(); | |
| 157 _instrumentationServer | 159 _instrumentationServer |
| 158 .log(_join([TAG_LOG_ENTRY, level, timeStamp, message])); | 160 .log(_join([TAG_LOG_ENTRY, level, timeStamp, message, exceptionText, s tackTraceText])); |
| 159 } | 161 } |
| 160 } | 162 } |
| 161 | 163 |
| 162 /** | 164 /** |
| 163 * Log that a notification has been sent to the client. | 165 * Log that a notification has been sent to the client. |
| 164 */ | 166 */ |
| 165 void logNotification(String notification) { | 167 void logNotification(String notification) { |
| 166 _log(TAG_NOTIFICATION, notification); | 168 _log(TAG_NOTIFICATION, notification); |
| 167 } | 169 } |
| 168 | 170 |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 363 } | 365 } |
| 364 } | 366 } |
| 365 | 367 |
| 366 @override | 368 @override |
| 367 void shutdown() { | 369 void shutdown() { |
| 368 for (InstrumentationServer server in _servers) { | 370 for (InstrumentationServer server in _servers) { |
| 369 server.shutdown(); | 371 server.shutdown(); |
| 370 } | 372 } |
| 371 } | 373 } |
| 372 } | 374 } |
| OLD | NEW |