quickwit icon indicating copy to clipboard operation
quickwit copied to clipboard

Enable increasing tracing level without increasing the log level

Open spew opened this issue 2 months ago • 0 comments

Currently, to enable debug level tracing, one sets the environment variable RUST_LOG to debug. This aloso increases the log level to be debug which often is not desired. The request is to add a new, appropriately named environment variable, such as RUST_TRACE, which can be used to independently change the tracing level.

From scanning the code I believe this is why, (1) is where tracing is configured. It uses this function (2) which uses RUST_LOG, if it could just read from RUST_TRACE instead that would give us what we want. However, (2) is also used at (3) for logging, so it could be changed to have the log level passed in and read from different env var for log vs trace:

  1. https://github.com/quickwit-oss/quickwit/blob/03ed8cfb9adc4c24cb0af3bad53c78442f11e1de/quickwit/quickwit-cli/src/logger.rs#L334
  2. https://github.com/quickwit-oss/quickwit/blob/03ed8cfb9adc4c24cb0af3bad53c78442f11e1de/quickwit/quickwit-cli/src/logger.rs#L46
  3. https://github.com/quickwit-oss/quickwit/blob/03ed8cfb9adc4c24cb0af3bad53c78442f11e1de/quickwit/quickwit-cli/src/logger.rs#L73

spew avatar Oct 30 '25 17:10 spew