jay_config/
logging.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//! Tools for modifying the logging behavior of the compositor.
//!
//! Note that you can use the `log` crate for logging. All invocations of `log::info` etc.
//! automatically log into the compositors log.

use serde::{Deserialize, Serialize};

/// The log level of the compositor or a log message.
#[derive(Serialize, Deserialize, Copy, Clone, Debug)]
pub enum LogLevel {
    Error,
    Warn,
    Info,
    Debug,
    Trace,
}

/// Sets the log level of the compositor.
pub fn set_log_level(level: LogLevel) {
    get!().set_log_level(level);
}