forked from mirror/mautrix-discord
logging: remove 'Starting' log and use duration instead
Signed-off-by: Sumner Evans <sumner@beeper.com>
This commit is contained in:
parent
f5ffbe1311
commit
57b7be8cbb
1 changed files with 3 additions and 1 deletions
|
@ -622,8 +622,8 @@ func (portal *Portal) handleDiscordMessageCreate(user *User, msg *discordgo.Mess
|
|||
log.Debug().Msg("Dropping duplicate message")
|
||||
return
|
||||
}
|
||||
log.Debug().Msg("Starting handling of Discord message")
|
||||
|
||||
handlingStartTime := time.Now()
|
||||
puppet := portal.bridge.GetPuppetByID(msg.Author.ID)
|
||||
puppet.UpdateInfo(user, msg.Author, msg)
|
||||
intent := puppet.IntentFor(portal)
|
||||
|
@ -678,6 +678,8 @@ func (portal *Portal) handleDiscordMessageCreate(user *User, msg *discordgo.Mess
|
|||
dbParts = append(dbParts, database.MessagePart{AttachmentID: part.AttachmentID, MXID: resp.EventID})
|
||||
eventIDs.Str(part.AttachmentID, resp.EventID.String())
|
||||
}
|
||||
|
||||
log = log.With().Dur("handling_time", time.Since(handlingStartTime)).Logger()
|
||||
if len(parts) == 0 {
|
||||
log.Warn().Msg("Unhandled message")
|
||||
} else if len(dbParts) == 0 {
|
||||
|
|
Loading…
Reference in a new issue