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

Unified Diff: pkg/analyzer/lib/instrumentation/instrumentation.dart

Issue 840553004: Capture log messages via instrumentation (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: pkg/analyzer/lib/instrumentation/instrumentation.dart
diff --git a/pkg/analyzer/lib/instrumentation/instrumentation.dart b/pkg/analyzer/lib/instrumentation/instrumentation.dart
index a3c13768a9dbe8292b65ea0e15caad57270b9e69..65b47c13b4c824a94f2602e2422ced27dc3b5617 100644
--- a/pkg/analyzer/lib/instrumentation/instrumentation.dart
+++ b/pkg/analyzer/lib/instrumentation/instrumentation.dart
@@ -47,6 +47,7 @@ class InstrumentationService {
static const String TAG_ERROR = 'Err';
static const String TAG_EXCEPTION = 'Ex';
+ static const String TAG_LOG_ENTRY = 'Log';
static const String TAG_NOTIFICATION = 'Noti';
static const String TAG_REQUEST = 'Req';
static const String TAG_RESPONSE = 'Res';
@@ -89,6 +90,17 @@ class InstrumentationService {
}
/**
+ * Log a log entry that was written to the analysis engine's log.
+ */
+ void logLogEntry(String level, DateTime time, String message) {
+ if (_instrumentationServer != null) {
+ String timeStamp = _toString(time);
+ _instrumentationServer.log(
+ _join([TAG_LOG_ENTRY, level, timeStamp, message]));
+ }
+ }
+
+ /**
* Log that a notification has been sent to the client.
*/
void logNotification(String notification) {

Powered by Google App Engine
This is Rietveld 408576698