matrix-org / complement-crypto

Apache License 2.0
11 stars 5 forks source link

Default to RPC for rust? #71

Open kegsay opened 5 months ago

kegsay commented 5 months ago

Rust has a single global logger without namespacing. This makes it really hard to see which logs lines are for alice vs bob vs a 2nd device. In contrast, JS SDK prefixes console log lines with the URL and user ID, allowing users/devices to be uniquely identified.

If we swap to RPC by default for rust, then 1 namespaced file is made per device of the form rust_sdk_logs_1user-2-bob_hs1_JBLTLBGVYV.2024-05-24-08

The downside to doing this however is that we then would mandate RPC binaries for all rust tests, which isn't as dev-friendly.

andybalaam commented 5 months ago

The rust SDK uses the tracing library, which I feel almost sure would allow us to provide a prefix that would be applied to its log messages.