mirror of
https://github.com/element-hq/dendrite.git
synced 2025-09-16 06:02:24 +03:00
Fix issue with multiple/duplicate log entries during tests (#2906)
This commit is contained in:
parent
ba2ffb7da9
commit
27a1dea522
2 changed files with 12 additions and 6 deletions
|
@ -33,6 +33,11 @@ import (
|
|||
"github.com/matrix-org/dendrite/setup/config"
|
||||
)
|
||||
|
||||
// logrus is using a global variable when we're using `logrus.AddHook`
|
||||
// this unfortunately results in us adding the same hook multiple times.
|
||||
// This map ensures we only ever add one level hook.
|
||||
var stdLevelLogAdded = make(map[logrus.Level]bool)
|
||||
|
||||
type utcFormatter struct {
|
||||
logrus.Formatter
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue