Closed
Description
I can only get error level logging using the project below, I've tried a bunch of versions of RUST_LOG that I think should work and none do (which is complicated by the fact that rustc --ls is still broken). I've tried:
RUST_LOG=logging2::crate::logging2=3
RUST_LOG=::logging2=3
RUST_LOG=3
and more.
Makefile:
RUSTC ?= rustc
dummy1 := $(shell mkdir bin 2> /dev/null)
check:
$(RUSTC) -o bin/test-logging2 --test crate.rc
export RUST_LOG=logging2::crate::logging2=3 && ./bin/test-logging2
clean:
rm -rf bin
crate.rc:
use std;
#[link(name = "logging2",
vers = "0.1",
uuid = "91E62841-B9F3-4721-97C6-621BEEE2DA1B")]
mod logging2;
logging2.rs:
#[test]
fn test_logging()
{
error!("error level");
warn!("warn level");
info!("info level");
}
This was with a rustc from master on Sep 1, 2012. Note that I was able to get logging working when compiling a stand-alone rs file.