rust/src/libstd/io
Alex Crichton ac2a24ecc9 Support arbitrary stdout/stderr/logger handles
This will allow capturing of common things like logging messages, stdout prints
(using stdio println), and failure messages (printed to stderr).  Any new prints
added to libstd should be funneled through these task handles to allow capture
as well.

Additionally, this commit redirects logging back through a `Logger` trait so the
log level can be usefully consumed by an arbitrary logger.

This commit also introduces methods to set the task-local stdout handles:

* std::io::stdio::set_stdout
* std::io::stdio::set_stderr
* std::io::logging::set_logger

These methods all return the previous logger just in case it needs to be used
for inspection.

I plan on using this infrastructure for extra::test soon, but we don't quite
have the primitives that I'd like to use for it, so it doesn't migrate
extra::test at this time.

Closes #6369
2014-01-06 13:19:53 -08:00
..
net Implement native UDP I/O 2013-12-31 11:34:22 -08:00
buffered.rs Don't allow newtype structs to be dereferenced. #6246 2014-01-04 14:44:12 -08:00
comm_adapters.rs Bring native process bindings up to date 2013-12-27 17:41:04 -08:00
extensions.rs libsyntax: Fix tests. 2014-01-03 22:22:40 -08:00
flate.rs std::str: s/from_utf8_slice/from_utf8/, to make the basic case shorter. 2013-12-04 22:35:53 +11:00
fs.rs Don't allow newtype structs to be dereferenced. #6246 2014-01-04 14:44:12 -08:00
mem.rs Restore Writer.write_char, see #10861. 2014-01-04 13:26:03 +00:00
mod.rs auto merge of #11310 : Dretch/rust/write_char, r=alexcrichton 2014-01-04 20:16:44 -08:00
option.rs std: Delete rt::test 2013-12-24 14:42:00 -08:00
pipe.rs std: Expose that LocalIo may not always be available 2013-12-24 14:42:00 -08:00
process.rs Bring native process bindings up to date 2013-12-27 17:41:04 -08:00
signal.rs std: Expose that LocalIo may not always be available 2013-12-24 14:42:00 -08:00
stdio.rs Support arbitrary stdout/stderr/logger handles 2014-01-06 13:19:53 -08:00
test.rs Implement native TCP I/O 2013-12-27 23:09:31 -08:00
timer.rs std: Expose that LocalIo may not always be available 2013-12-24 14:42:00 -08:00
util.rs std: silence warnings when compiling test. 2013-12-20 01:26:03 +11:00