| OLD | NEW |
| 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 * Support for debugging and error logging. | 6 * Support for debugging and error logging. |
| 7 * | 7 * |
| 8 * This library introduces abstractions similar to | 8 * This library introduces abstractions similar to |
| 9 * those used in other languages, such as the Closure JS | 9 * those used in other languages, such as the Closure JS |
| 10 * Logger and java.util.logging.Logger. | 10 * Logger and java.util.logging.Logger. |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 final int sequenceNumber; | 303 final int sequenceNumber; |
| 304 | 304 |
| 305 static int _nextNumber = 0; | 305 static int _nextNumber = 0; |
| 306 | 306 |
| 307 /** Associated exception (if any) when recording errors messages. */ | 307 /** Associated exception (if any) when recording errors messages. */ |
| 308 var exception; | 308 var exception; |
| 309 | 309 |
| 310 LogRecord(this.level, this.message, this.loggerName, [this.exception]) | 310 LogRecord(this.level, this.message, this.loggerName, [this.exception]) |
| 311 : time = new DateTime.now(), | 311 : time = new DateTime.now(), |
| 312 sequenceNumber = LogRecord._nextNumber++; | 312 sequenceNumber = LogRecord._nextNumber++; |
| 313 |
| 314 String toString() => '[${level.name}] $loggerName: $message'; |
| 313 } | 315 } |
| OLD | NEW |