2012-07-04 23:53:12 +02:00
|
|
|
//! Logging
|
2012-01-13 22:20:11 +01:00
|
|
|
|
2012-09-21 02:18:18 +02:00
|
|
|
// NB: transitionary, de-mode-ing.
|
|
|
|
#[forbid(deprecated_mode)];
|
|
|
|
#[forbid(deprecated_pattern)];
|
|
|
|
|
2012-09-25 21:16:34 +02:00
|
|
|
export console_on, console_off;
|
2012-01-13 22:20:11 +01:00
|
|
|
|
|
|
|
#[nolink]
|
2012-07-04 01:11:00 +02:00
|
|
|
extern mod rustrt {
|
2012-09-22 03:10:45 +02:00
|
|
|
#[legacy_exports];
|
2012-01-13 22:20:11 +01:00
|
|
|
fn rust_log_console_on();
|
|
|
|
fn rust_log_console_off();
|
|
|
|
}
|
|
|
|
|
2012-07-04 23:53:12 +02:00
|
|
|
/// Turns on logging to stdout globally
|
2012-01-13 22:20:11 +01:00
|
|
|
fn console_on() {
|
|
|
|
rustrt::rust_log_console_on();
|
|
|
|
}
|
|
|
|
|
2012-07-04 23:53:12 +02:00
|
|
|
/**
|
|
|
|
* 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 22:20:11 +01:00
|
|
|
fn console_off() {
|
|
|
|
rustrt::rust_log_console_off();
|
2012-09-25 21:16:34 +02:00
|
|
|
}
|