2012-01-13 15:20:11 -06:00
|
|
|
#[doc = "Logging"];
|
|
|
|
|
|
|
|
export console_on, console_off;
|
|
|
|
|
|
|
|
#[nolink]
|
|
|
|
native mod rustrt {
|
|
|
|
fn rust_log_console_on();
|
|
|
|
fn rust_log_console_off();
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc = "Turns on logging to stdout globally"]
|
|
|
|
fn console_on() {
|
|
|
|
rustrt::rust_log_console_on();
|
|
|
|
}
|
|
|
|
|
2012-03-06 21:09:32 -06:00
|
|
|
#[doc = "
|
|
|
|
Turns off logging to stdout globally
|
|
|
|
|
|
|
|
Turns off the console unless the user has overridden the
|
|
|
|
runtime environment's logging spec, e.g. by setting
|
|
|
|
the RUST_LOG environment variable
|
|
|
|
"]
|
2012-01-13 15:20:11 -06:00
|
|
|
fn console_off() {
|
|
|
|
rustrt::rust_log_console_off();
|
|
|
|
}
|