logger

package
v0.0.0-...-10f18be Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TLSVersionStrings = map[uint16]string{
	tls.VersionTLS13: "TLS1.3",
	tls.VersionTLS12: "TLS1.2",
	tls.VersionTLS11: "TLS1.1",
	tls.VersionTLS10: "TLS1.0",

	tls.VersionSSL30: "SSL3.0",
}

TLSVersionStrings is a map of TLS version IDs to their string representation.

Functions

func RequestProtocol

func RequestProtocol(state request.Request) string

RequestProtocol return a string version of the protocol (UDP, TCP or TLS) TLS has its version appended if it is available (which should always be)

Types

type Config

type Config struct {
	FlushInterval int
	Timeout       int
	Retry         int
	Target        string
	Remote        string
	LogFormat     string
	SamplingRate  float64
	Category      string
}

Config represents the configuration used for our scribecat client.

type DNSTapLogger

type DNSTapLogger struct {
	// contains filtered or unexported fields
}

DNSTapLogger logs to dnstap output

func NewLogger

func NewLogger(config Config) (l *DNSTapLogger, err error)

NewLogger initialize a DNSTapLogger by setting the right outputs and format

func (*DNSTapLogger) Log

func (l *DNSTapLogger) Log(state request.Request, r *dns.Msg, _ *dns.EDNS0_SUBNET, _ *db.Location)

Log is used to log to dnstap.

func (*DNSTapLogger) LogFailed

func (l *DNSTapLogger) LogFailed(state request.Request, ecs *dns.EDNS0_SUBNET, loc *db.Location)

LogFailed is used to log failures

func (*DNSTapLogger) StartLoggerOutput

func (l *DNSTapLogger) StartLoggerOutput()

StartLoggerOutput starts the dnstap logger output loop

Jump to

Keyboard shortcuts

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