From 44850faead403ea21b63894740c0cba54a756138 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Tue, 7 Apr 2020 14:47:02 -0400 Subject: [PATCH] document the new logging infrastructure more accurately --- rayon-core/src/log.rs | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/rayon-core/src/log.rs b/rayon-core/src/log.rs index 34eb9b9f9..0f8f079f1 100644 --- a/rayon-core/src/log.rs +++ b/rayon-core/src/log.rs @@ -1,11 +1,22 @@ //! Debug Logging //! -//! To use in a debug build, set the env var `RAYON_RS_LOG=1`. In a -//! release build, logs are compiled out by default unless Rayon is built -//! with `--cfg rayon_rs_log` (try `RUSTFLAGS="--cfg rayon_rs_log"`). +//! To use in a debug build, set the env var `RAYON_RS_LOG` as +//! described below. In a release build, logs are compiled out by +//! default unless Rayon is built with `--cfg rayon_rs_log` (try +//! `RUSTFLAGS="--cfg rayon_rs_log"`). //! //! Note that logs are an internally debugging tool and their format //! is considered unstable, as are the details of how to enable them. +//! +//! # Valid values for RAYON_RS_LOG +//! +//! The `RAYON_RS_LOG` variable can take on the following values: +//! +//! * `tail:` -- dumps the last 10,000 events into the given file; +//! useful for tracking down deadlocks +//! * `profile:` -- dumps only those events needed to reconstruct how +//! many workers are active at a given time +//! * `all:` -- dumps every event to the file; useful for debugging use crossbeam_channel::{self, Receiver, Sender}; use std::collections::VecDeque;