aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorJon Heinritz <jon.heinritz@protonmail.com>2025-03-12 02:32:12 +0100
committerIvan Molodetskikh <yalterz@gmail.com>2025-03-22 12:29:11 +0300
commite88dfae46fed95a2b302e1d1e805da10c2b95fa1 (patch)
tree9e8b5585a0909f85b58a6346e89674180c60a7f1 /src/main.rs
parentf95d5a82df89d3f09e818091a853b3608eaa5831 (diff)
downloadniri-e88dfae46fed95a2b302e1d1e805da10c2b95fa1.tar.gz
niri-e88dfae46fed95a2b302e1d1e805da10c2b95fa1.tar.bz2
niri-e88dfae46fed95a2b302e1d1e805da10c2b95fa1.zip
main: Log to stderr instead of stdout
Currently we can't use logging in paths like niri msg that have meaningful stdout. Logging to stderr makes that possible. Even if we don't want to log anything in niri msg code paths, it's easy to have something accidentally log.
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
index fd34ae82..3281d19b 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -52,6 +52,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
let env_filter = EnvFilter::builder().parse_lossy(directives);
tracing_subscriber::fmt()
.compact()
+ .with_writer(io::stderr)
.with_env_filter(env_filter)
.init();