File: logrus_prefixed_formatter_suite_test.go

package info (click to toggle)
golang-github-x-cray-logrus-prefixed-formatter 0.5.2-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 92 kB
  • sloc: makefile: 25
file content (26 lines) | stat: -rw-r--r-- 429 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package prefixed_test

import (
	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"

	"testing"
)

type LogOutput struct {
	buffer string
}

func (o *LogOutput) Write(p []byte) (int, error) {
	o.buffer += string(p[:])
	return len(p), nil
}

func (o *LogOutput) GetValue() string {
	return o.buffer
}

func TestLogrusPrefixedFormatter(t *testing.T) {
	RegisterFailHandler(Fail)
	RunSpecs(t, "LogrusPrefixedFormatter Suite")
}