refactor: clean up the logs and reduce noise

- Remove "Detected Autocrypt-mime message" logs printed for every incoming Autocrypt message.
- Print only a single line at the beginning of receive_imf with both the Message-ID and seen flag.
- Print Securejoin step only once, inside handle_securejoin_handshake or observe_securejoin_on_other_device.
- Do not log "Not creating ad-hoc group" every time ad-hoc group is not created, log when it is created instead.
- Log ID of the chat where Autocrypt-Gossip for all members is received.
- Do not print "Secure-join requested." for {vg,vc}-request, we already log the step.
- Remove ">>>>>>>>>>>>>>>>>>>>>>>>>" noise from securejoin logs.
This commit is contained in:
link2xt
2023-12-05 18:52:37 +00:00
parent d574ee4edb
commit 1447ab8dac
8 changed files with 25 additions and 58 deletions

View File

@@ -287,10 +287,7 @@ pub(crate) async fn handle_securejoin_handshake(
.get_header(HeaderDef::SecureJoin)
.context("Not a Secure-Join message")?;
info!(
context,
">>>>>>>>>>>>>>>>>>>>>>>>> secure-join message \'{}\' received", step,
);
info!(context, "Received secure-join message {step:?}.");
let join_vg = step.starts_with("vg-");
@@ -316,7 +313,6 @@ pub(crate) async fn handle_securejoin_handshake(
warn!(context, "Secure-join denied (bad invitenumber).");
return Ok(HandshakeMessage::Ignore);
}
info!(context, "Secure-join requested.",);
inviter_progress(context, contact_id, 300);
@@ -554,7 +550,7 @@ pub(crate) async fn observe_securejoin_on_other_device(
let step = mime_message
.get_header(HeaderDef::SecureJoin)
.context("Not a Secure-Join message")?;
info!(context, "observing secure-join message \'{}\'", step);
info!(context, "Observing secure-join message {step:?}.");
match step.as_str() {
"vg-request-with-auth"