Skip to content

Commit

Permalink
chore(ffi): silence useless logs coming out of the ffi crate
Browse files Browse the repository at this point in the history
Setting the default log level to `debug` results in logs like:

```
log: log_event
log: latest_event
log: log_event
log: log_event
log: room_info
log: latest_event
log: log_event
log: room_info
```

Presumably they're coming out of the custom tracing configuration and we definitely don't need them.
  • Loading branch information
stefanceriu committed Jan 16, 2025
1 parent c24770a commit 2cb6ee8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions bindings/matrix-sdk-ffi/src/platform.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,9 @@ const DEFAULT_TARGET_LOG_LEVELS: &[(LogTarget, LogLevel)] = &[
];

const IMMUTABLE_TARGET_LOG_LEVELS: &[LogTarget] = &[
LogTarget::Hyper, // Too verbose
LogTarget::MatrixSdk, // Too generic
LogTarget::Hyper, // Too verbose
LogTarget::MatrixSdk, // Too generic
LogTarget::MatrixSdkFfi, // Too verbose
];

#[derive(uniffi::Record)]
Expand Down Expand Up @@ -398,7 +399,7 @@ mod tests {
filter,
"panic=error,\
hyper=warn,\
matrix_sdk_ffi=trace,\
matrix_sdk_ffi=info,\
matrix_sdk=info,\
matrix_sdk::client=trace,\
matrix_sdk_crypto=trace,\
Expand Down

0 comments on commit 2cb6ee8

Please sign in to comment.