// Code generated by "go run err_generate.go"; DO NOT EDIT.

package root

import (
	"errors"
	"fmt"
	"log/slog"

	"codeberg.org/miekg/dns/cmd/atomdns/internal/dnslog"
)

func (r *Root) Err(err error) error { return fmt.Errorf("%s: %w", r.Key(), err) }

func (r *Root) Errf(err string) error { return fmt.Errorf("%s: %w", r.Key(), errors.New(err)) }

func Err(err error) slog.Attr { return dnslog.Error(err) }

func (r *Root) Key() string { return "root" }

var log = func() *slog.Logger { return slog.Default().With("handler", "root") }
