Chromium Code Reviews| 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 * 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 * | |
| 10 * ## Installing ## | |
| 11 * | |
| 12 * Use [pub][] to install this package. Add the following to your `pubspec.yaml` | |
| 13 * file. | |
| 14 * | |
| 15 * dependencies: | |
| 16 * logging: any | |
| 17 * | |
| 18 * Then run `pub install`. | |
| 19 * | |
| 20 * For more information, see the | |
| 21 * [logging package on pub.dartlang.org][pkg]. | |
| 22 * | |
| 23 * [pub]: http://pub.dartlang.org | |
| 24 * [pkg]: http://pub.dartlang.org/packages/logging | |
|
Andrei Mouravski
2013/04/19 20:36:09
I like this, could you replicate elsewhere?
sethladd
2013/04/19 20:39:21
? this is used is the rest of the files.
Andrei Mouravski
2013/04/19 20:52:58
Not the ones before this file (intl, http, args, e
| |
| 9 */ | 25 */ |
| 10 library logging; | 26 library logging; |
| 11 | 27 |
| 12 import 'dart:async'; | 28 import 'dart:async'; |
| 13 | 29 |
| 14 /** | 30 /** |
| 15 * Whether to allow fine-grain logging and configuration of loggers in a | 31 * Whether to allow fine-grain logging and configuration of loggers in a |
| 16 * hierarchy. When false, all logging is merged in the root logger. | 32 * hierarchy. When false, all logging is merged in the root logger. |
| 17 */ | 33 */ |
| 18 bool hierarchicalLoggingEnabled = false; | 34 bool hierarchicalLoggingEnabled = false; |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 296 | 312 |
| 297 /** Associated exception message (if any) when recording errors messages. */ | 313 /** Associated exception message (if any) when recording errors messages. */ |
| 298 String exceptionText; | 314 String exceptionText; |
| 299 | 315 |
| 300 LogRecord( | 316 LogRecord( |
| 301 this.level, this.message, this.loggerName, | 317 this.level, this.message, this.loggerName, |
| 302 [time, this.exception, this.exceptionText]) : | 318 [time, this.exception, this.exceptionText]) : |
| 303 this.time = (time == null) ? new DateTime.now() : time, | 319 this.time = (time == null) ? new DateTime.now() : time, |
| 304 this.sequenceNumber = LogRecord._nextNumber++; | 320 this.sequenceNumber = LogRecord._nextNumber++; |
| 305 } | 321 } |
| OLD | NEW |