Skip to content

examples(iroh): add --logs and --mode ping features to transfer example#3893

Merged
dignifiedquire merged 13 commits intomainfrom
Frando/transfer-improve
Feb 16, 2026
Merged

examples(iroh): add --logs and --mode ping features to transfer example#3893
dignifiedquire merged 13 commits intomainfrom
Frando/transfer-improve

Conversation

@Frando
Copy link
Copy Markdown
Member

@Frando Frando commented Jan 28, 2026

Description

More improvements to our transport example to ease dogfooding:

  • new --logs flag (for both provide and fetch) for simple file logging:
    • without further config, creates a directory ./logs/transfer-{cmd}-{date}-{endpoint_id} and saves logs with iroh=trace,transfer=trace to a logs file in that directory.
    • different log level can be set with RUST_LOG
    • different path can be set with --logs-path
    • qlog files are also written to that directory if the qlog feature is enabled
  • New --mode ping option for fetch command: instead of transferring as much data as possible, this just keeps the connection open until the --duration is expired (default: 10s). This gives much smaller log files (both tracing and qlog) so easier to debug when looking for connection changes only.
  • Regular output now includes the time since start after each line. Useful to interpret the "switched to direct" etc lines after the fact (they didn't have any time indication so far)
  • Better formatting for durations
  • Better spans on accept side. Each connection gets an id now that easily allows to grep for that connection through both iroh and quinn logs
  • Print path ids with the paths stats and changes. This allows to correlate with the tracing logs now.

With both logs and qlog in a single dir it's now really straightforward to share it eg with sendme.

Breaking Changes

Notes & open questions

Should --logs include iroh_quinn=trace by default or not?

Change checklist

  • Self-review.
  • Documentation updates following the style guide, if relevant.
  • Tests if relevant.
  • All breaking changes documented.
    • List all breaking changes in the above "Breaking Changes" section.
    • Open an issue or PR on any number0 repos that are affected by this breaking change. Give guidance on how the updates should be handled or do the actual updates themselves. The major ones are:

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 28, 2026

Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh/pr/3893/docs/iroh/

Last updated: 2026-02-16T11:33:04Z

@n0bot n0bot bot added this to iroh Jan 28, 2026
@github-project-automation github-project-automation bot moved this to 🚑 Needs Triage in iroh Jan 28, 2026
@Frando Frando changed the title examples(iroh): improve transport example examples(iroh): improve transport example more Jan 28, 2026
@Frando Frando changed the title examples(iroh): improve transport example more examples(iroh): add --logs and --mode ping features to transfer examle Jan 28, 2026
@Frando Frando changed the title examples(iroh): add --logs and --mode ping features to transfer examle examples(iroh): add --logs and --mode ping features to transfer example Jan 28, 2026
@dignifiedquire dignifiedquire added this to the iroh: v0.97 milestone Feb 3, 2026
@dignifiedquire dignifiedquire moved this from 🚑 Needs Triage to 🏗 In progress in iroh Feb 3, 2026
Copy link
Copy Markdown
Member

@matheus23 matheus23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some nits. Good to go after those IMO.

It is worrisome how big the transfer example has become...
At some point I'd love to go through the transfer example, iroh-doctor code, sendme, dumbpipe, etc. and extract out common useful pieces and restart something like iroh-node-utils.

@dignifiedquire dignifiedquire merged commit 08b0b8a into main Feb 16, 2026
27 of 29 checks passed
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in iroh Feb 16, 2026
@dignifiedquire dignifiedquire deleted the Frando/transfer-improve branch February 16, 2026 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

3 participants