github.com/amazechain/amc@v0.1.3/log/logrus-prefixed-formatter/logrus_prefixed_formatter_suite_test.go (about) 1 package prefixed_test 2 3 import ( 4 . "github.com/onsi/ginkgo" 5 . "github.com/onsi/gomega" 6 7 "testing" 8 ) 9 10 type LogOutput struct { 11 buffer string 12 } 13 14 func (o *LogOutput) Write(p []byte) (int, error) { 15 o.buffer += string(p) 16 return len(p), nil 17 } 18 19 func (o *LogOutput) GetValue() string { 20 return o.buffer 21 } 22 23 func TestLogrusPrefixedFormatter(t *testing.T) { 24 RegisterFailHandler(Fail) 25 RunSpecs(t, "LogrusPrefixedFormatter Suite") 26 }