| OLD | NEW |
| 1 // Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dartino 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.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
| 4 | 4 |
| 5 // TODO(ahe): We should have a more general logging facility. | 5 // TODO(ahe): We should have a more general logging facility. |
| 6 // We currently print directly to stdout (via Zone.ROOT.print) and assume that | 6 // We currently print directly to stdout (via Zone.ROOT.print) and assume that |
| 7 // stdout of this process is piped to a log file. | 7 // stdout of this process is piped to a log file. |
| 8 library fletchc.console_print; | 8 library dartino_compiler.console_print; |
| 9 | 9 |
| 10 import 'dart:async' show | 10 import 'dart:async' show |
| 11 Zone; | 11 Zone; |
| 12 | 12 |
| 13 typedef void OneArgVoid(line); | 13 typedef void OneArgVoid(line); |
| 14 | 14 |
| 15 /// Prints a message to the console of the persistent process. This should be | 15 /// Prints a message to the console of the persistent process. This should be |
| 16 /// used for logging. | 16 /// used for logging. |
| 17 /// | 17 /// |
| 18 /// For most debug-by-print situations, [print] is almost always a better | 18 /// For most debug-by-print situations, [print] is almost always a better |
| 19 /// choice as it is intercepted and directed to the C++ client. | 19 /// choice as it is intercepted and directed to the C++ client. |
| 20 /// | 20 /// |
| 21 /// Only change this in tests. | 21 /// Only change this in tests. |
| 22 OneArgVoid printToConsole = Zone.ROOT.print; | 22 OneArgVoid printToConsole = Zone.ROOT.print; |
| OLD | NEW |