From a2ccb987b0194f1105b1364792303f9f12a65a77 Mon Sep 17 00:00:00 2001 From: Eliza Weisman Date: Thu, 3 Feb 2022 12:21:09 -0800 Subject: [PATCH] subscriber: fix outdated formatter docs (#1893) This fixes outdated statements in the docs for the `Full` and `Compact` logging formats. Closes #1880. Signed-off-by: Eliza Weisman --- tracing-subscriber/src/fmt/format/mod.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tracing-subscriber/src/fmt/format/mod.rs b/tracing-subscriber/src/fmt/format/mod.rs index 204df05fab..87d3deadc4 100644 --- a/tracing-subscriber/src/fmt/format/mod.rs +++ b/tracing-subscriber/src/fmt/format/mod.rs @@ -301,13 +301,17 @@ pub struct FieldFnVisitor<'a, F> { } /// Marker for `Format` that indicates that the compact log format should be used. /// -/// The compact format only includes the fields from the most recently entered span. +/// The compact format includes fields from all currently entered spans, after +/// the event's fields. Span fields are not grouped by span, and span names are +/// not shown. In addition, a more compact representation of each event's +/// [`Level`](tracing::Level) is used. #[derive(Default, Debug, Copy, Clone, Eq, PartialEq)] pub struct Compact; -/// Marker for `Format` that indicates that the verbose log format should be used. +/// Marker for `Format` that indicates that the default log format should be used. /// -/// The full format includes fields from all entered spans. +/// This format shows the span context before printing event data. Spans are +/// displayed including their names and fields. #[derive(Default, Debug, Copy, Clone, Eq, PartialEq)] pub struct Full;