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

Side by Side Diff: pkg/logging/lib/logging.dart

Issue 11191078: Make hashCode a getter and not a method. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status file with co19 issue number. Created 8 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 /** 5 /**
6 * Provides APIs for debugging and error logging. This library introduces 6 * Provides APIs for debugging and error logging. This library introduces
7 * abstractions similar to those used in other languages, such as the Closure JS 7 * abstractions similar to those used in other languages, such as the Closure JS
8 * Logger and java.util.logging.Logger. 8 * Logger and java.util.logging.Logger.
9 */ 9 */
10 #library('logging'); 10 #library('logging');
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 289
290 /** Key for extra debugging loudness ([value] = 1200). */ 290 /** Key for extra debugging loudness ([value] = 1200). */
291 static const Level SHOUT = const Level('SHOUT', 1200); 291 static const Level SHOUT = const Level('SHOUT', 1200);
292 292
293 bool operator ==(Level other) => other != null && value == other.value; 293 bool operator ==(Level other) => other != null && value == other.value;
294 bool operator <(Level other) => value < other.value; 294 bool operator <(Level other) => value < other.value;
295 bool operator <=(Level other) => value <= other.value; 295 bool operator <=(Level other) => value <= other.value;
296 bool operator >(Level other) => value > other.value; 296 bool operator >(Level other) => value > other.value;
297 bool operator >=(Level other) => value >= other.value; 297 bool operator >=(Level other) => value >= other.value;
298 int compareTo(Level other) => value - other.value; 298 int compareTo(Level other) => value - other.value;
299 int hashCode() => value; 299 int get hashCode => value;
300 String toString() => name; 300 String toString() => name;
301 } 301 }
302 302
303 303
304 /** 304 /**
305 * A log entry representation used to propagate information from [Logger] to 305 * A log entry representation used to propagate information from [Logger] to
306 * individual [Handler]s. 306 * individual [Handler]s.
307 */ 307 */
308 class LogRecord { 308 class LogRecord {
309 final Level level; 309 final Level level;
(...skipping 15 matching lines...) Expand all
325 325
326 /** Associated exception message (if any) when recording errors messages. */ 326 /** Associated exception message (if any) when recording errors messages. */
327 String exceptionText; 327 String exceptionText;
328 328
329 LogRecord( 329 LogRecord(
330 this.level, this.message, this.loggerName, 330 this.level, this.message, this.loggerName,
331 [time, this.exception, this.exceptionText]) : 331 [time, this.exception, this.exceptionText]) :
332 this.time = (time == null) ? new Date.now() : time, 332 this.time = (time == null) ? new Date.now() : time,
333 this.sequenceNumber = LogRecord._nextNumber++; 333 this.sequenceNumber = LogRecord._nextNumber++;
334 } 334 }
OLDNEW
« no previous file with comments | « pkg/fixnum/intx.dart ('k') | runtime/bin/http_impl.dart » ('j') | tests/co19/co19-dart2js.status » ('J')

Powered by Google App Engine
This is Rietveld 408576698