Repository: sirupsen/logrus (go)

Issue:
Deadlock during Entry.Infof after upgrade to v1.5.0
Issue does not happen when using v1.4.2.
When I upgrade to v1.5.0 I get a deadlock immediately upon application startup.

Killing stack trace:
```
goroutine 1 [semacquire, 3 minutes]:
sync.runtime_SemacquireMutex(0xc000140034, 0x2078100, 0x1)
	/home/tzvatot/go/src/runtime/sema.go:71 +0x47
sync.(*Mutex).lockSlow(0xc000140030)
	/home/tzvatot/go/src/sync/mutex.go:138 +0xfc
sync.(*Mutex).Lock(...)
	/home/tzvatot/go/src/sync/mutex.go:81
github.com/sirupsen/logrus.(*MutexWrap).Lock(...)
	/home/tzvatot/go/pkg/mod/github.com/sirupsen/logrus@v1.5.0/logger.go:53
github.com/sirupsen/logrus.(*Entry).WithFields(0xc0001b8ee0, 0xc000724f20, 0x0)
	/home/tzvatot/go/pkg/mod/github.com/sirupsen/logrus@v1.5.0/entry.go:125 +0x68d
github.com/sirupsen/logrus.(*Entry).WithField(...)
	/home/tzvatot/go/pkg/mod/github.com/sirupsen/logrus@v1.5.0/entry.go:120
github.com/onrik/logrus/filename.(*wrapper).Format(0xc0004271a0, 0xc0001b8ee0, 0x30, 0x23bc480, 0xc00053ac01, 0xc0003cef30, 0xc0006650c0)
	/home/tzvatot/go/pkg/mod/github.com/onrik/logrus@v0.0.0-20181225141908-a09d5cdcdc62/filename/filename.go:19 +0x184
github.com/sirupsen/logrus.(*Entry).write(0xc0001b8ee0)
	/home/tzvatot/go/pkg/mod/github.com/sirupsen/logrus@v1.5.0/entry.go:277 +0xa1
github.com/sirupsen/logrus.Entry.log(0xc000140000, 0xc0003ceea0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/home/tzvatot/go/pkg/mod/github.com/sirupsen/logrus@v1.5.0/entry.go:253 +0x1c1
github.com/sirupsen/logrus.(*Entry).Log(0xc0001b8cb0, 0x4, 0xc0006652e0, 0x1, 0x1)
	/home/tzvatot/go/pkg/mod/github.com/sirupsen/logrus@v1.5.0/entry.go:289 +0xeb
github.com/sirupsen/logrus.(*Entry).Logf(0xc0001b8cb0, 0xc000000004, 0x27353c8, 0x8f, 0xc000665450, 0x1, 0x1)
	/home/tzvatot/go/pkg/mod/github.com/sirupsen/logrus@v1.5.0/entry.go:335 +0xe2
github.com/sirupsen/logrus.(*Entry).Infof(...)
	/home/tzvatot/go/pkg/mod/github.com/sirupsen/logrus@v1.5.0/entry.go:348
```

Using go version go1.13.5 linux/amd64

Pull request description:
Revert #1047
Effectively reverts #1047 to fix #1128, #1120, #1122 as many users are seeing deadlocks after updating to 1.5.0.

The potential reason being is that calling `WithFields` from within a Hook tries to acquire the same lock, which is already acquired by the hook

This will re-open #1046

Patch:
diff --git a/entry.go b/entry.go
index 27b14bf..f6e062a 100644
--- a/entry.go
+++ b/entry.go
@@ -122,8 +122,6 @@ func (entry *Entry) WithField(key string, value interface{}) *Entry {
 
 // Add a map of fields to the Entry.
 func (entry *Entry) WithFields(fields Fields) *Entry {
-	entry.Logger.mu.Lock()
-	defer entry.Logger.mu.Unlock()
 	data := make(Fields, len(entry.Data)+len(fields))
 	for k, v := range entry.Data {
 		data[k] = v


Test patch:
diff --git a/entry_test.go b/entry_test.go
index 30eddae..b98e14a 100644
--- a/entry_test.go
+++ b/entry_test.go
@@ -210,7 +210,7 @@ func TestEntryWithIncorrectField(t *testing.T) {
 
 	fn := func() {}
 
-	e := &Entry{Logger: New()}
+	e := Entry{}
 	eWithFunc := e.WithFields(Fields{"func": fn})
 	eWithFuncPtr := e.WithFields(Fields{"funcPtr": &fn})