Skip to content
This repository has been archived by the owner on Aug 1, 2022. It is now read-only.

Commit

Permalink
fix: use tracing for logs
Browse files Browse the repository at this point in the history
We use the `tracing` and `tracing-subscriber` to do logging. This gives
us nicer output and structured logs.

Includes radicle-dev/radicle-link#727

Signed-off-by: Thomas Scholtes <geigerzaehler@axiom.fm>
  • Loading branch information
Thomas Scholtes authored and geigerzaehler committed Jul 22, 2021
1 parent 8750756 commit dad7694
Show file tree
Hide file tree
Showing 16 changed files with 149 additions and 107 deletions.
169 changes: 99 additions & 70 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions native/proxy-process-manager.ts
Expand Up @@ -6,6 +6,7 @@

import { spawn, ChildProcess } from "child_process";
import { CircularBuffer } from "mnemonist";
import stripAnsi from "strip-ansi";

export interface ProcessResult {
status: number | null;
Expand Down Expand Up @@ -68,7 +69,7 @@ export class ProxyProcessManager {
split[0] = stdoutBuf + split[0];
stdoutBuf = split.pop() || "";
for (const line of split) {
outputBuffer.push(line);
outputBuffer.push(stripAnsi(line));
}
});

Expand All @@ -84,7 +85,7 @@ export class ProxyProcessManager {
split[0] = stderrBuf + split[0];
stderrBuf = split.pop() || "";
for (const line of split) {
outputBuffer.push(line);
outputBuffer.push(stripAnsi(line));
}
});

Expand Down
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -182,6 +182,7 @@
"radicle-contracts": "github:radicle-dev/radicle-contracts#commit=157a5b59df94704702623765198deb4ba70ace84",
"semver": "^7.3.5",
"stream-browserify": "^3.0.0",
"strip-ansi": "^6.0.0",
"svelte-persistent-store": "^0.1.6",
"timeago.js": "^4.0.2",
"twemoji": "13.1.0",
Expand Down

0 comments on commit dad7694

Please sign in to comment.