improve logging (#4578)

This commit is contained in:
Doug Lauder 2023-02-14 16:42:32 -05:00 committed by GitHub
parent 098868387e
commit 6576d75192
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 2 deletions

View file

@ -344,7 +344,7 @@ func appendContentChanges(fields []*mm_model.SlackAttachmentField, cardDiff *Dif
}
}
logger.Debug("appendContentChanges",
logger.Trace("appendContentChanges",
mlog.String("type", string(child.BlockType)),
mlog.String("opString", opString),
mlog.String("oldTitle", oldTitle),

View file

@ -2,6 +2,7 @@ package utils
import (
"context"
"runtime/debug"
"sync/atomic"
"time"
@ -119,9 +120,11 @@ func (cn *CallbackQueue) exec(f CallbackFunc) {
// don't let a panic in the callback exit the thread.
defer func() {
if r := recover(); r != nil {
stack := debug.Stack()
cn.logger.Error("CallbackQueue callback panic",
mlog.String("name", cn.name),
mlog.Any("panic", r),
mlog.String("stack", string(stack)),
)
}
}()

View file

@ -454,7 +454,7 @@ func (pa *PluginAdapter) sendBoardMessage(teamID, boardID string, payload map[st
}
func (pa *PluginAdapter) BroadcastBlockChange(teamID string, block *model.Block) {
pa.logger.Debug("BroadcastingBlockChange",
pa.logger.Trace("BroadcastingBlockChange",
mlog.String("teamID", teamID),
mlog.String("boardID", block.BoardID),
mlog.String("blockID", block.ID),