mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-05 06:28:20 -04:00
chore(sdk): Reduce log verbosity from info -> trace in a few functions (#4747)
At the default `INFO` log level, the log gets inundated with thousands of emitted statements, primarily related to `is_display_name_ambiguous()`. The execution of this tiny function certainly doesn't need to be traced every time, at least not at the info log level. Note: some of these could be debatably reduced to debug level rather than trace level, but I went with "trace" because they all seem to be trace statements rather than actual debug dump outputs (there is no actual program state dumped out). Signed-off-by: Kevin Boos [kevinaboos@gmail.com](mailto:kevinaboos@gmail.com) --------- Signed-off-by: Kevin Boos <1139460+kevinaboos@users.noreply.github.com>
This commit is contained in:
@@ -86,7 +86,7 @@ pub(crate) struct AmbiguityCache {
|
||||
pub changes: BTreeMap<OwnedRoomId, BTreeMap<OwnedEventId, AmbiguityChange>>,
|
||||
}
|
||||
|
||||
#[instrument(ret)]
|
||||
#[instrument(ret(level = "trace"))]
|
||||
pub(crate) fn is_display_name_ambiguous(
|
||||
display_name: &DisplayName,
|
||||
users_with_display_name: &BTreeSet<OwnedUserId>,
|
||||
|
||||
@@ -47,7 +47,7 @@ use std::{
|
||||
};
|
||||
|
||||
use tokio::sync::Mutex;
|
||||
use tracing::{debug, error, info, instrument, trace};
|
||||
use tracing::{debug, error, instrument, trace};
|
||||
|
||||
use crate::{
|
||||
executor::{spawn, JoinHandle},
|
||||
@@ -216,7 +216,7 @@ impl<S: BackingStore + Clone + SendOutsideWasm + 'static> CrossProcessStoreLock<
|
||||
if let Some(_prev) = renew_task.take() {
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
if !_prev.is_finished() {
|
||||
info!("aborting the previous renew task");
|
||||
trace!("aborting the previous renew task");
|
||||
_prev.abort();
|
||||
}
|
||||
}
|
||||
@@ -238,7 +238,7 @@ impl<S: BackingStore + Clone + SendOutsideWasm + 'static> CrossProcessStoreLock<
|
||||
|
||||
// If there are no more users, we can quit.
|
||||
if this.num_holders.load(atomic::Ordering::SeqCst) == 0 {
|
||||
info!("exiting the lease extension loop");
|
||||
trace!("exiting the lease extension loop");
|
||||
|
||||
// Cancel the lease with another 0ms lease.
|
||||
// If we don't get the lock, that's (weird but) fine.
|
||||
|
||||
@@ -30,7 +30,7 @@ use matrix_sdk::{
|
||||
use ruma::{events::AnySyncTimelineEvent, OwnedEventId, RoomVersionId};
|
||||
use tokio::sync::broadcast::{error::RecvError, Receiver};
|
||||
use tokio_stream::wrappers::errors::BroadcastStreamRecvError;
|
||||
use tracing::{info, info_span, trace, warn, Instrument, Span};
|
||||
use tracing::{info_span, trace, warn, Instrument, Span};
|
||||
|
||||
use super::{
|
||||
controller::{TimelineController, TimelineSettings},
|
||||
@@ -423,7 +423,7 @@ async fn room_send_queue_update_task(
|
||||
mut send_queue_stream: Receiver<RoomSendQueueUpdate>,
|
||||
timeline_controller: TimelineController,
|
||||
) {
|
||||
info!("spawned the local echo task!");
|
||||
trace!("spawned the local echo task!");
|
||||
|
||||
loop {
|
||||
match send_queue_stream.recv().await {
|
||||
@@ -434,7 +434,7 @@ async fn room_send_queue_update_task(
|
||||
}
|
||||
|
||||
Err(RecvError::Closed) => {
|
||||
info!("channel closed, exiting the local echo handler");
|
||||
trace!("channel closed, exiting the local echo handler");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -522,7 +522,7 @@ impl RoomSendQueue {
|
||||
global_error_reporter: broadcast::Sender<SendQueueRoomError>,
|
||||
is_dropping: Arc<AtomicBool>,
|
||||
) {
|
||||
info!("spawned the sending task");
|
||||
trace!("spawned the sending task");
|
||||
|
||||
loop {
|
||||
// A request to shut down should be preferred above everything else.
|
||||
|
||||
Reference in New Issue
Block a user