diff options
| author | bors <bors@rust-lang.org> | 2015-02-03 03:44:05 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-02-03 03:44:05 +0000 |
| commit | 7858cb432d3f2efc0374424cb2b51518f697c172 (patch) | |
| tree | bccd460a861e61f758d2d459cb9da02b1ad8792b /src/liblog | |
| parent | eaf4c5c784637f3df8bdebc6ec21dbd4bc69420a (diff) | |
| parent | 9ece22ee00033cdf0b6b418c451112c92c8ad922 (diff) | |
| download | rust-7858cb432d3f2efc0374424cb2b51518f697c172.tar.gz rust-7858cb432d3f2efc0374424cb2b51518f697c172.zip | |
Auto merge of #21872 - alexcrichton:rollup, r=alexcrichton
Diffstat (limited to 'src/liblog')
| -rw-r--r-- | src/liblog/lib.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/liblog/lib.rs b/src/liblog/lib.rs index 81d8c60f893..34216518c21 100644 --- a/src/liblog/lib.rs +++ b/src/liblog/lib.rs @@ -173,15 +173,15 @@ #![feature(int_uint)] #![feature(core)] #![feature(io)] -#![feature(os)] #![feature(std_misc)] +#![feature(env)] use std::cell::RefCell; use std::fmt; use std::old_io::LineBufferedWriter; use std::old_io; use std::mem; -use std::os; +use std::env; use std::ptr; use std::rt; use std::slice; @@ -397,9 +397,9 @@ fn enabled(level: u32, /// This is not threadsafe at all, so initialization is performed through a /// `Once` primitive (and this function is called from that primitive). fn init() { - let (mut directives, filter) = match os::getenv("RUST_LOG") { - Some(spec) => directive::parse_logging_spec(&spec[]), - None => (Vec::new(), None), + let (mut directives, filter) = match env::var_string("RUST_LOG") { + Ok(spec) => directive::parse_logging_spec(&spec[]), + Err(..) => (Vec::new(), None), }; // Sort the provided directives by length of their name, this allows a |
