Skip to content

Commit

Permalink
Merge pull request #38 from cmars/fix/no-ui-no-ansi
Browse files Browse the repository at this point in the history
fix: disable ansi colors in no-ui mode
  • Loading branch information
cmars authored Mar 31, 2024
2 parents 7f27239 + ed5803c commit 824c35d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,18 @@ See `distrans --help` for more options.

Try fetching a test file with `distrans get VLD0:cCHB85pEaV4bvRfywxnd2fRNBScR64UaJC8hoKzyr3M`.

## Troubleshooting

### Clock skew

Distrans operates an embedded Veilid node, which requires a synchronized local clock. Clock skew can prevent distrans from connecting to the Veilid network.

### Debug logging

Logging can be configured with the [RUST_LOG environment variable](https://docs.rs/env_logger/latest/env_logger/#enabling-logging).

`RUST_LOG=debug` will enable all debug-level logging in distrans as well as veilid-core, which may be useful for troubleshooting low-level Veilid network problems and reporting issues.

# Development

In a Nix environment, `nix develop github:cmars/distrans` (or `nix develop` in this directory) to get a devshell with the necessary tool dependencies.
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt, EnvFilte

pub fn initialize_stderr_logging() {
tracing_subscriber::registry()
.with(tracing_subscriber::fmt::layer().with_writer(std::io::stdout))
.with(tracing_subscriber::fmt::layer().with_ansi(false).with_writer(std::io::stdout))
.with(
EnvFilter::builder()
.with_default_directive("distrans=debug".parse().unwrap())
Expand Down

0 comments on commit 824c35d

Please sign in to comment.