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

Unified Diff: dart/pkg/logging/lib/logging.dart

Issue 786813002: Adding a "zone" value to "class LogRecord" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years 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
« no previous file with comments | « no previous file | dart/pkg/logging/test/logging_test.dart » ('j') | dart/pkg/logging/test/logging_test.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/pkg/logging/lib/logging.dart
diff --git a/dart/pkg/logging/lib/logging.dart b/dart/pkg/logging/lib/logging.dart
index 5f4bc2be8ae4cbaf2a85652190cbc22045c7fbba..66aeb8e685f8291b1b14c48d638c9696d7d62296 100644
--- a/dart/pkg/logging/lib/logging.dart
+++ b/dart/pkg/logging/lib/logging.dart
@@ -147,7 +147,7 @@ class Logger {
if (message is! String) message = message.toString();
var record = new LogRecord(logLevel, message, fullName, error,
- stackTrace);
+ stackTrace, Zone.current);
if (hierarchicalLoggingEnabled) {
var target = this;
@@ -314,8 +314,12 @@ class LogRecord {
/** Associated stackTrace (if any) when recording errors messages. */
final StackTrace stackTrace;
+ /** Zone of the calling code which resulted in this LogRecord. */
+ final Zone zone;
+
LogRecord(this.level, this.message, this.loggerName, [this.error,
Søren Gjesse 2014/12/09 07:48:35 I know that this is not related to you change, but
kustermann 2015/01/07 12:38:44 That would be a breaking change and I don't intent
- this.stackTrace])
+ this.stackTrace,
+ this.zone])
: time = new DateTime.now(),
sequenceNumber = LogRecord._nextNumber++;
« no previous file with comments | « no previous file | dart/pkg/logging/test/logging_test.dart » ('j') | dart/pkg/logging/test/logging_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698