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

package metrics

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

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

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

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

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

func (m *Metrics) Key() string { return "metrics" }

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