summary refs log tree commit diff
path: root/src/libcore/logging.rs
blob: d9c0274f390da5481b7ba00ba47c3b6dd4c7f3f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#[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();
}

#[doc(
    brief =
    "Turns off logging to stdout globally",
    desc =
    "Turns off the console unless the user has overridden the \
     runtime environment's logging spec, e.g. by setting \
     the RUST_LOG environment variable"
)]
fn console_off() {
    rustrt::rust_log_console_off();
}