diff options
| author | bors <bors@rust-lang.org> | 2013-10-09 07:31:36 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-10-09 07:31:36 -0700 |
| commit | 2e64a718ea7db51f79a46441907bf659cb761e9c (patch) | |
| tree | 21763a628e345263523b01905de4b57ca2063259 /src/libstd/rt | |
| parent | a3b04c1535ab0e733e59b8e1f7801e523cd72fa3 (diff) | |
| parent | 88593fc3fc808e78dd89be95c997c94ba4c816da (diff) | |
| download | rust-2e64a718ea7db51f79a46441907bf659cb761e9c.tar.gz rust-2e64a718ea7db51f79a46441907bf659cb761e9c.zip | |
auto merge of #9664 : alexcrichton/rust/logging, r=huonw
This makes some headway on #3309, see commits for details.
Diffstat (limited to 'src/libstd/rt')
| -rw-r--r-- | src/libstd/rt/logging.rs | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/src/libstd/rt/logging.rs b/src/libstd/rt/logging.rs index 8b8e2762381..b08e76921d8 100644 --- a/src/libstd/rt/logging.rs +++ b/src/libstd/rt/logging.rs @@ -10,7 +10,7 @@ use fmt; use from_str::from_str; -use libc::{uintptr_t, exit}; +use libc::exit; use option::{Some, None, Option}; use rt; use rt::util::dumb_println; @@ -174,9 +174,7 @@ pub struct StdErrLogger; impl Logger for StdErrLogger { fn log(&mut self, args: &fmt::Arguments) { - if should_log_console() { - fmt::writeln(self as &mut rt::io::Writer, args); - } + fmt::writeln(self as &mut rt::io::Writer, args); } } @@ -222,21 +220,6 @@ pub fn init() { } } -#[fixed_stack_segment] #[inline(never)] -pub fn console_on() { unsafe { rust_log_console_on() } } - -#[fixed_stack_segment] #[inline(never)] -pub fn console_off() { unsafe { rust_log_console_off() } } - -#[fixed_stack_segment] #[inline(never)] -fn should_log_console() -> bool { unsafe { rust_should_log_console() != 0 } } - -extern { - fn rust_log_console_on(); - fn rust_log_console_off(); - fn rust_should_log_console() -> uintptr_t; -} - // Tests for parse_logging_spec() #[test] fn parse_logging_spec_valid() { |
