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 */ | 9 */ |
10 library logging; | 10 library logging; |
11 | 11 |
12 import 'dart:async'; | 12 import 'dart:async'; |
13 | 13 |
14 // Please leave the pkg in place here, as the publish_pkg.py script | 14 import 'package:meta/meta.dart'; |
Siggi Cherem (dart-lang)
2013/03/27 19:20:35
fyi - kevmoo is about to submit a chance that will
| |
15 // needs it to rewrite imports correctly. | |
16 import '../../../pkg/meta/lib/meta.dart'; | |
17 | 15 |
18 /** | 16 /** |
19 * Whether to allow fine-grain logging and configuration of loggers in a | 17 * Whether to allow fine-grain logging and configuration of loggers in a |
20 * hierarchy. When false, all logging is merged in the root logger. | 18 * hierarchy. When false, all logging is merged in the root logger. |
21 */ | 19 */ |
22 bool hierarchicalLoggingEnabled = false; | 20 bool hierarchicalLoggingEnabled = false; |
23 | 21 |
24 /** | 22 /** |
25 * Level for the root-logger. This will be the level of all loggers if | 23 * Level for the root-logger. This will be the level of all loggers if |
26 * [hierarchicalLoggingEnabled] is false. | 24 * [hierarchicalLoggingEnabled] is false. |
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
355 | 353 |
356 /** Associated exception message (if any) when recording errors messages. */ | 354 /** Associated exception message (if any) when recording errors messages. */ |
357 String exceptionText; | 355 String exceptionText; |
358 | 356 |
359 LogRecord( | 357 LogRecord( |
360 this.level, this.message, this.loggerName, | 358 this.level, this.message, this.loggerName, |
361 [time, this.exception, this.exceptionText]) : | 359 [time, this.exception, this.exceptionText]) : |
362 this.time = (time == null) ? new DateTime.now() : time, | 360 this.time = (time == null) ? new DateTime.now() : time, |
363 this.sequenceNumber = LogRecord._nextNumber++; | 361 this.sequenceNumber = LogRecord._nextNumber++; |
364 } | 362 } |
OLD | NEW |