jay_config/logging.rs
1//! Tools for modifying the logging behavior of the compositor.
2//!
3//! Note that you can use the `log` crate for logging. All invocations of `log::info` etc.
4//! automatically log into the compositors log.
5
6use serde::{Deserialize, Serialize};
7
8/// The log level of the compositor or a log message.
9#[derive(Serialize, Deserialize, Copy, Clone, Debug)]
10pub enum LogLevel {
11 Error,
12 Warn,
13 Info,
14 Debug,
15 Trace,
16}
17
18/// Sets the log level of the compositor.
19pub fn set_log_level(level: LogLevel) {
20 get!().set_log_level(level);
21}