From e2565db9bc78bced2a871086916c41846a990a26 Mon Sep 17 00:00:00 2001 From: Tassilo Horn Date: Sun, 13 Feb 2022 09:30:30 +0100 Subject: [PATCH] Nicer log output --- README.md | 6 ++++-- src/layout.rs | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index cf4d8cb..2e171c5 100644 --- a/README.md +++ b/README.md @@ -172,8 +172,10 @@ exec env RUST_BACKTRACE=1 RUST_LOG=swayr=debug swayrd > /tmp/swayrd.log 2>&1 The setting of `RUST_BACKTRACE=1`, `RUST_LOG=swayr=debug` and the redirection of the output to some logfile is optional but helps a lot when something doesn't work. Especially, if you encounter a crash in certain situations and -you want to report a bug, it would be utmost helpful if you could reproduce -the issue with backtrace and logging and attach that to your bug report. +you want to report a bug, it would be utmost helpful if you could reproduce the +issue with backtrace and logging at the `debug` level and attach that to your +bug report. (Valid log levels are: `trace`, `debug`, `info`, `warn`, `error`, +`off`.) Next to starting the demon, you want to bind swayr commands to some keys like so: diff --git a/src/layout.rs b/src/layout.rs index 07b4b15..171ee66 100644 --- a/src/layout.rs +++ b/src/layout.rs @@ -121,13 +121,13 @@ pub fn auto_tile(res_to_min_width: &HashMap) { pub fn maybe_auto_tile(config: &config::Config) { if config.is_layout_auto_tile() { - log::debug!("\nauto_tile: start"); + log::debug!("auto_tile: start"); auto_tile( &config .get_layout_auto_tile_min_window_width_per_output_width_as_map( ), ); - log::debug!("auto_tile: end\n"); + log::debug!("auto_tile: end"); } }