From bb1bfbcb48d94444584b0a2e2d17edf50c9959ba Mon Sep 17 00:00:00 2001 From: Andrew Ferrazzutti Date: Fri, 16 Jun 2023 11:51:10 -0400 Subject: [PATCH 1/3] Add docs on how to use tracing for local Node dev --- bindings/matrix-sdk-crypto-nodejs/README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/bindings/matrix-sdk-crypto-nodejs/README.md b/bindings/matrix-sdk-crypto-nodejs/README.md index b8fca601e..07107af3e 100644 --- a/bindings/matrix-sdk-crypto-nodejs/README.md +++ b/bindings/matrix-sdk-crypto-nodejs/README.md @@ -184,6 +184,20 @@ See [`tracing-subscriber`](https://tracing.rs/tracing_subscriber/index.html) to learn more about the `RUST_LOG`/`MATRIX_LOG` environment variable. +#### Using tracing in a development environment + +To use tracing in client applications that import these bindings, here's how to do it in +a local development environment: + +- In this directory, run `npm link` to make your local build of the bindings available to +other Node projects on your system +- In your client app's source directory, run `npm link @matrix-org/matrix-sdk-crypto-nodejs` +to make it use your trace-enabled local build of the bindings +- In your client app's source code, add a call to `initTracing` near startup time +- Run your app with the `MATRIX_LOG` environment variable set to the desired log level + +Either `npm link` command may be substituted with `yarn link`. + ## Documentation [The documentation can be found From 1f141fc372622012b0f80855ecee911719b838e7 Mon Sep 17 00:00:00 2001 From: Andrew Ferrazzutti Date: Mon, 19 Jun 2023 08:25:27 -0400 Subject: [PATCH 2/3] Format README.md --- bindings/matrix-sdk-crypto-nodejs/README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bindings/matrix-sdk-crypto-nodejs/README.md b/bindings/matrix-sdk-crypto-nodejs/README.md index 07107af3e..65728f63c 100644 --- a/bindings/matrix-sdk-crypto-nodejs/README.md +++ b/bindings/matrix-sdk-crypto-nodejs/README.md @@ -189,12 +189,12 @@ to learn more about the `RUST_LOG`/`MATRIX_LOG` environment variable. To use tracing in client applications that import these bindings, here's how to do it in a local development environment: -- In this directory, run `npm link` to make your local build of the bindings available to -other Node projects on your system -- In your client app's source directory, run `npm link @matrix-org/matrix-sdk-crypto-nodejs` -to make it use your trace-enabled local build of the bindings -- In your client app's source code, add a call to `initTracing` near startup time -- Run your app with the `MATRIX_LOG` environment variable set to the desired log level +- In this directory, run `npm link` to make your local build of the bindings available to + other Node projects on your system +- In your client app's source directory, run `npm link @matrix-org/matrix-sdk-crypto-nodejs` + to make it use your trace-enabled local build of the bindings +- In your client app's source code, add a call to `initTracing` near startup time +- Run your app with the `MATRIX_LOG` environment variable set to the desired log level Either `npm link` command may be substituted with `yarn link`. From c618094c198c6b13e398b2a5da7c286c87aab9ee Mon Sep 17 00:00:00 2001 From: Andrew Ferrazzutti Date: Mon, 19 Jun 2023 09:11:15 -0400 Subject: [PATCH 3/3] Retitle tracing section --- bindings/matrix-sdk-crypto-nodejs/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bindings/matrix-sdk-crypto-nodejs/README.md b/bindings/matrix-sdk-crypto-nodejs/README.md index 65728f63c..e9b98ddbf 100644 --- a/bindings/matrix-sdk-crypto-nodejs/README.md +++ b/bindings/matrix-sdk-crypto-nodejs/README.md @@ -184,9 +184,9 @@ See [`tracing-subscriber`](https://tracing.rs/tracing_subscriber/index.html) to learn more about the `RUST_LOG`/`MATRIX_LOG` environment variable. -#### Using tracing in a development environment +#### Using tracing in dependent projects -To use tracing in client applications that import these bindings, here's how to do it in +To enable tracing in client applications that import these bindings, here's how to do it in a local development environment: - In this directory, run `npm link` to make your local build of the bindings available to