improve logging (#4578)
This commit is contained in:
parent
098868387e
commit
6576d75192
3 changed files with 5 additions and 2 deletions
|
@ -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),
|
||||
|
|
|
@ -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)),
|
||||
)
|
||||
}
|
||||
}()
|
||||
|
|
|
@ -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),
|
||||
|
|
Loading…
Reference in a new issue