Welcome to mirror list, hosted at ThFree Co, Russian Federation.

log_testhelper_test.go « log « internal - gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c96b77e61163a2616e75d8dbfcd896cd3134bd54 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package log

import (
	"io"

	"github.com/sirupsen/logrus"
)

// newLogger creates a new logger for testing purposes. Use of `logrus.New()` is forbidden globally, but required here
// to verify that we correctly configure our logging infrastructure.
//
//nolint:forbidigo
func newLogger() *logrus.Logger {
	logger := logrus.New()
	logger.Out = io.Discard
	return logger
}