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 /// Message logging. | 5 /// Message logging. |
6 library log; | 6 library log; |
7 | 7 |
| 8 import 'dart:async'; |
8 import 'dart:io'; | 9 import 'dart:io'; |
9 import 'io.dart'; | 10 import 'io.dart'; |
10 | 11 |
11 typedef LogFn(Entry entry); | 12 typedef LogFn(Entry entry); |
12 final Map<Level, LogFn> _loggers = new Map<Level, LogFn>(); | 13 final Map<Level, LogFn> _loggers = new Map<Level, LogFn>(); |
13 | 14 |
14 /// The list of recorded log messages. Will only be recorded if | 15 /// The list of recorded log messages. Will only be recorded if |
15 /// [recordTranscript()] is called. | 16 /// [recordTranscript()] is called. |
16 List<Entry> _transcript; | 17 List<Entry> _transcript; |
17 | 18 |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 stream.writeString(' | '); | 220 stream.writeString(' | '); |
220 } | 221 } |
221 } | 222 } |
222 | 223 |
223 stream.writeString(line); | 224 stream.writeString(line); |
224 stream.writeString('\n'); | 225 stream.writeString('\n'); |
225 | 226 |
226 firstLine = false; | 227 firstLine = false; |
227 } | 228 } |
228 } | 229 } |
OLD | NEW |