From acaf7afc5b605cc6649227185ca4dda08908c332 Mon Sep 17 00:00:00 2001 From: Milo Moisson Date: Mon, 16 Dec 2024 17:32:58 +0100 Subject: [PATCH] docs: document `JJ_LOG` and `--debug` --- docs/contributing.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/contributing.md b/docs/contributing.md index f0a052f54e..1b7b6c6e24 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -455,6 +455,16 @@ you can submit a PR based on the `gh-pages` bookmark of The `.rs` files generated from `.proto` files are included in the repository, and there is a GitHub CI check that will complain if they do not match. +## Logging + +You can print internal jj logs using `JJ_LOG`. It acts like the `RUST_LOG` +environment variable, frequent in Rust codebases, and accepts one or more +[directives]. You can also use the `--debug` global option that sets +`debug` log level for all targets by default. `JJ_LOG` is still respected when +using `--debug`. + +[directives]: https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives + ## Profiling One easy-to-use sampling profiler