Commit Graph

8 Commits

Author SHA1 Message Date
Maxim Sukharev 08e8d6501d Skip func pointer type value in fields
Before there was introduced a fix for JSONFormatter when func type value
passed as Field. This commit does the same but for pointer to func.

Ref:
https://github.com/sirupsen/logrus/issues/642
https://github.com/sirupsen/logrus/pull/832
2018-12-05 19:14:19 +01:00
Maurício Linhares 977e03308a
Fix deadlock on panics at Entry.log
When calling Entry.log a panic inside some of the
locking blocks could cause the whole logger to deadlock.

One of the ways this could happen is for a hook to cause
a panic, when this happens the lock is never unlocked and
the library deadlocks, causing the code that is calling
it to deadlock as well.

This changes how locking happens with unlocks at defer
blocks so even if a panic happens somewhere along the log
call the library will still unlock and continue to function.
2018-01-22 10:52:46 -05:00
Antoine Grondin 38c9fd2510 Revert "Implement casting of *Entry to error."
This reverts commit 756db3cd2d.
2015-09-07 20:47:46 -04:00
Joern Barthel 756db3cd2d Implement casting of *Entry to error. 2015-05-19 20:20:59 +02:00
Joern Barthel e3e5de11c4 Implement WithError(err) in exported, fixed doco. 2015-05-19 19:50:55 +02:00
Joern Barthel c24d0555d7 Added WithError(err). 2015-05-13 13:35:03 +02:00
Dan Buch 5164671bc6 Making panic level assertions more helpful 2014-11-06 08:42:52 -05:00
Dan Buch 9836f1ba0e Adding tests for PanicLevel behavior, plus changing behavior! 🙀 2014-11-05 20:39:35 -05:00