summaryrefslogtreecommitdiffstats
path: root/src/log.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/log.rs')
-rw-r--r--src/log.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/log.rs b/src/log.rs
index 0f0723f..a5a9518 100644
--- a/src/log.rs
+++ b/src/log.rs
@@ -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(),