Skip to content

Commit 9b84546

Browse files
committed
log snippet
1 parent 76d6910 commit 9b84546

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

deployment/iroh-doctor.mdx

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,32 @@
22
title: "Troubleshooting"
33
---
44

5+
## Logging
6+
7+
iroh uses the `tracing` crate for logging. To enable logging in your
8+
application, you need to set up a subscriber.
9+
10+
11+
```rust
12+
use tracing_subscriber::layer::SubscriberExt;
13+
use tracing_subscriber::util::SubscriberInitExt;
14+
15+
tracing_subscriber::registry()
16+
.with(tracing_subscriber::EnvFilter::from_default_env())
17+
.with(tracing_subscriber::fmt::layer())
18+
.init();
19+
```
20+
21+
## Doctor CLI
522
[iroh doctor](https://github.com/n0-computer/iroh-doctor) is a command-line tool that helps you diagnose network connectivity issues with your iroh setup.
623

7-
## Installation
24+
### Installation
825

926
```
1027
cargo install iroh-doctor
1128
```
1229

13-
## Home Relay
30+
### Home Relay
1431

1532
All iroh endpoints will maintain a single home relay server that they're
1633
reachable at. On startup iroh will probe its configured relays & choose the one

0 commit comments

Comments
 (0)