func (ft *FailingTarget) Write(p []byte, rec *logr.LogRec) (int, error) {
	return 0, errors.New("FailingTarget always fails")
}
Write simply fails.
package test
import (
	"errors"
	"github.com/mattermost/logr/v2"
)
type FailingTarget struct {
}
func NewFailingTarget() *FailingTarget {
	t := &FailingTarget{}
	return t
}
func (ft *FailingTarget) Init() error {
	return nil
}