1 // Copyright 2013 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
15 macro_rules! uverrln (
17 format_args!(::macros::dumb_println, $($arg)*)
21 // Some basic logging. Enabled by passing `--cfg uvdebug` to the libstd build.
22 macro_rules! uvdebug (
30 pub fn dumb_println(args: &fmt::Arguments) {
35 impl io::Writer for Stderr {
36 fn write(&mut self, data: &[u8]) -> io::IoResult<()> {
38 libc::write(libc::STDERR_FILENO,
39 data.as_ptr() as *libc::c_void,
40 data.len() as libc::size_t)
42 Ok(()) // just ignore the errors
46 let _ = fmt::writeln(&mut w as &mut io::Writer, args);