summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/sirupsen/logrus/entry.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2021-04-03 19:16:46 +0200
committerGitHub <noreply@github.com>2021-04-03 19:16:46 +0200
commit21eb37e471c338a90f2e23c86106f7e49e2d1196 (patch)
treee7d1cfa89f31fcf0578edae7727f2230bba744a2 /vendor/github.com/sirupsen/logrus/entry.go
parentd3b60cc445e5871971b543fde9483dba3924bf68 (diff)
downloadmatterbridge-msglm-21eb37e471c338a90f2e23c86106f7e49e2d1196.tar.gz
matterbridge-msglm-21eb37e471c338a90f2e23c86106f7e49e2d1196.tar.bz2
matterbridge-msglm-21eb37e471c338a90f2e23c86106f7e49e2d1196.zip
Update vendor (#1446)
* Update vendor * Use upstream emoji lib again
Diffstat (limited to 'vendor/github.com/sirupsen/logrus/entry.go')
-rw-r--r--vendor/github.com/sirupsen/logrus/entry.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/vendor/github.com/sirupsen/logrus/entry.go b/vendor/github.com/sirupsen/logrus/entry.go
index c968f634..07a1e5fa 100644
--- a/vendor/github.com/sirupsen/logrus/entry.go
+++ b/vendor/github.com/sirupsen/logrus/entry.go
@@ -261,7 +261,15 @@ func (entry *Entry) log(level Level, msg string) {
}
func (entry *Entry) fireHooks() {
- err := entry.Logger.Hooks.Fire(entry.Level, entry)
+ var tmpHooks LevelHooks
+ entry.Logger.mu.Lock()
+ tmpHooks = make(LevelHooks, len(entry.Logger.Hooks))
+ for k, v := range entry.Logger.Hooks {
+ tmpHooks[k] = v
+ }
+ entry.Logger.mu.Unlock()
+
+ err := tmpHooks.Fire(entry.Level, entry)
if err != nil {
fmt.Fprintf(os.Stderr, "Failed to fire hook: %v\n", err)
}