Skip to content

Commit 3f9ee5f

Browse files
committed
Feedback
1 parent a167e80 commit 3f9ee5f

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/lib.rs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,10 +195,18 @@
195195
//!
196196
//! ### Logging
197197
//!
198-
//! You can set the logging level of the Rust SDK via the `RESTATE_LOGGING` environment variable and the level values can be `TRACE`, `DEBUG`, `INFO`, `WARN` or `ERROR`.
199-
//! The default log level is `INFO`.
198+
//! The rust SDK uses the [tracing crate][tracing], so you need to configure the `tracing_subscriber` to get logs:
199+
//! ```rust,no_run
200+
//! #[tokio::main]
201+
//! async fn main() {
202+
//! //! To enable logging
203+
//! tracing_subscriber::fmt::init();
204+
//!
205+
//! // Start http server etc...
206+
//! }
207+
//! ```
200208
//!
201-
//! If you set the level to `TRACE`, you can also get more verbose logging of the journal by setting the environment variable `RESTATE_JOURNAL_LOGGING=TRACE`.
209+
//! For more information, have a look at the [tracing subscriber doc](https://docs.rs/tracing-subscriber/latest/tracing_subscriber/fmt/index.html#filtering-events-with-environment-variables).
202210
//!
203211
//! # References
204212
//!

0 commit comments

Comments
 (0)