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

Side by Side Diff: lib/logging.dart

Issue 823613004: Make type signature consistent with class Object (Closed) Base URL: https://github.com/dart-lang/logging@master
Patch Set: Created 5 years, 12 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 */ 6 */
7 library logging; 7 library logging;
8 8
9 import 'dart:async'; 9 import 'dart:async';
10 import 'dart:collection'; 10 import 'dart:collection';
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 271
272 /** Key for serious failures ([value] = 1000). */ 272 /** Key for serious failures ([value] = 1000). */
273 static const Level SEVERE = const Level('SEVERE', 1000); 273 static const Level SEVERE = const Level('SEVERE', 1000);
274 274
275 /** Key for extra debugging loudness ([value] = 1200). */ 275 /** Key for extra debugging loudness ([value] = 1200). */
276 static const Level SHOUT = const Level('SHOUT', 1200); 276 static const Level SHOUT = const Level('SHOUT', 1200);
277 277
278 static const List<Level> LEVELS = const 278 static const List<Level> LEVELS = const
279 [ALL, FINEST, FINER, FINE, CONFIG, INFO, WARNING, SEVERE, SHOUT, OFF]; 279 [ALL, FINEST, FINER, FINE, CONFIG, INFO, WARNING, SEVERE, SHOUT, OFF];
280 280
281 bool operator ==(Object other) => other is Level && value == other.value; 281 bool operator ==(other) => other is Level && value == other.value;
282 bool operator <(Level other) => value < other.value; 282 bool operator <(Level other) => value < other.value;
283 bool operator <=(Level other) => value <= other.value; 283 bool operator <=(Level other) => value <= other.value;
284 bool operator >(Level other) => value > other.value; 284 bool operator >(Level other) => value > other.value;
285 bool operator >=(Level other) => value >= other.value; 285 bool operator >=(Level other) => value >= other.value;
286 int compareTo(Level other) => value - other.value; 286 int compareTo(Level other) => value - other.value;
287 int get hashCode => value; 287 int get hashCode => value;
288 String toString() => name; 288 String toString() => name;
289 } 289 }
290 290
291 291
(...skipping 22 matching lines...) Expand all
314 /** Associated stackTrace (if any) when recording errors messages. */ 314 /** Associated stackTrace (if any) when recording errors messages. */
315 final StackTrace stackTrace; 315 final StackTrace stackTrace;
316 316
317 LogRecord(this.level, this.message, this.loggerName, [this.error, 317 LogRecord(this.level, this.message, this.loggerName, [this.error,
318 this.stackTrace]) 318 this.stackTrace])
319 : time = new DateTime.now(), 319 : time = new DateTime.now(),
320 sequenceNumber = LogRecord._nextNumber++; 320 sequenceNumber = LogRecord._nextNumber++;
321 321
322 String toString() => '[${level.name}] $loggerName: $message'; 322 String toString() => '[${level.name}] $loggerName: $message';
323 } 323 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698