Merge pull request #556 from Deseao/master

Update test hook name
This commit is contained in:
Simon Eskildsen 2017-07-09 13:35:57 -04:00 committed by GitHub
commit 8c2f155eec
1 changed files with 2 additions and 2 deletions

View File

@ -451,13 +451,13 @@ Logrus has a built in facility for asserting the presence of log messages. This
```go
import(
"github.com/sirupsen/logrus"
"github.com/sirupsen/logrus/hooks/null"
"github.com/sirupsen/logrus/hooks/test"
"github.com/stretchr/testify/assert"
"testing"
)
func TestSomething(t*testing.T){
logger, hook := null.NewNullLogger()
logger, hook := test.NewNullLogger()
logger.Error("Helloerror")
assert.Equal(t, 1, len(hook.Entries))