You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: test_output.go
    path of file: ./repos/k6/lib/testutils
    
    the code of the file until where you have to start completion: package testutils

import (
	"io"
	"testing"

	"github.com/sirupsen/logrus"
)

// Something that makes the test also be a valid io.Writer, useful for passing it
// as an output for logs and CLI flag help messages...
type testOutput struct{ testing.TB }

func (to testOutput) Write(p []byte) (n int, err er
    
func NewLoggerWithHook(t testing.TB, levels ...logrus.Level) (logrus.FieldLogger, *SimpleLogrusHook) {
	maxLevel := logrus.PanicLevel
	if len(levels) == 0 {
		levels = logrus.AllLevels
		maxLevel = logrus.DebugLevel
	} else {
		for _, l := range levels {
			if l > maxLevel {
				maxLevel = l
			}
		}
	}

	l := newLogger(t, maxLevel)
	hook := NewLogHook(levels...)
	l.AddHook(hook)
	return l, hook
}