aghslog

package
v0.107.67 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 25, 2025 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package aghslog contains logging constants and helpers.

Index

Constants

View Source
const (
	// KeyClientName is the log attribute for the client name.
	KeyClientName = "client_name"

	// KeyUpstreamType is the log attribute for the upstream types.  See the
	// UpstreamType* constants below.
	KeyUpstreamType = "upstream_type"
)
View Source
const (
	// UpstreamTypeBootstrap is the log attribute value for bootstrap upstreams.
	UpstreamTypeBootstrap = "bootstrap"

	// UpstreamTypeCustom is the log attribute value for custom upstreams.
	UpstreamTypeCustom = "custom"

	// UpstreamTypeFallback is the log attribute value for fallback upstreams.
	UpstreamTypeFallback = "fallback"

	// UpstreamTypeMain is the log attribute value for main upstreams.
	UpstreamTypeMain = "main"

	// UpstreamTypeLocal is the log attribute value for upstreams used for
	// resolving PTR records for local addresses.
	UpstreamTypeLocal = "local"

	// UpstreamTypeService is the log attribute value for upstreams used for
	// safe browsing and parental services.
	UpstreamTypeService = "service"

	// UpstreamTypeTest is the log attribute value for upstreams used for
	// testing and validation.
	UpstreamTypeTest = "test"
)
View Source
const PrefixDNSProxy = "dnsproxy"

PrefixDNSProxy is the prefix for DNS proxy logs.

Variables

This section is empty.

Functions

func NewForUpstream

func NewForUpstream(baseLogger *slog.Logger, typ string) (l *slog.Logger)

NewForUpstream returns a new logger with a prefix for logs related to a specific upstream type.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL