diff options
Diffstat (limited to 'src/log.rs')
-rw-r--r-- | src/log.rs | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -4,6 +4,11 @@ use log4rs; use crate::constant_strings_paths::{ACTION_LOG_PATH, LOG_CONFIG_PATH}; use crate::utils::extract_lines; +/// Set the logs. +/// The configuration is read from a config file defined in `LOG_CONFIG_PATH` +/// It's a YAML file which defines 2 logs: +/// - a normal one used directly with the macros like `log::info!(...)`, used for debugging +/// - a special one used with `log::info!(target: "special", ...)` to be displayed in the application pub fn set_loggers() -> Result<()> { log4rs::init_file( shellexpand::tilde(LOG_CONFIG_PATH).as_ref(), |