From 80144415e6cbade594858f80b218894ef5072229 Mon Sep 17 00:00:00 2001 From: Natrix Date: Fri, 2 May 2025 13:53:03 +0200 Subject: [PATCH] subscriber: Add note about potential misuse of stdout to documentation --- tracing-subscriber/src/fmt/mod.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tracing-subscriber/src/fmt/mod.rs b/tracing-subscriber/src/fmt/mod.rs index 1e3bfc359b..bc3dc0a291 100644 --- a/tracing-subscriber/src/fmt/mod.rs +++ b/tracing-subscriber/src/fmt/mod.rs @@ -5,7 +5,11 @@ //! [`tracing`] is a framework for instrumenting Rust programs with context-aware, //! structured, event-based diagnostic information. This crate provides an //! implementation of the [`Collect`] trait that records `tracing`'s `Event`s -//! and `Span`s by formatting them as text and logging them to stdout. +//! and `Span`s by formatting them as text and logging them to **stdout**. +//! +//! _Note: It is not good practice to write logging information to stdout. +//! It is recommended for most applications to set this to stderr instead, which +//! can be done with [`CollectorBuilder::with_writer`]_ //! //! # Usage //!