wglog

package
v0.0.0-...-9d29f1b Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2023 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Overview

Package wglog contains logging helpers for wireguard-go.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger struct {
	DeviceLogger *device.Logger
	// contains filtered or unexported fields
}

A Logger is a wireguard-go log wrapper that cleans up and rewrites log lines. It can be modified at run time to adjust to new wireguard-go configurations.

func NewLogger

func NewLogger(logf logger.Logf) *Logger

NewLogger creates a new logger for use with wireguard-go. This logger silences repetitive/unhelpful noisy log lines and rewrites peer keys from wireguard-go into Tailscale format.

func (*Logger) SetPeers

func (x *Logger) SetPeers(peers []wgcfg.Peer)

SetPeers adjusts x to rewrite the peer public keys found in peers. SetPeers is safe for concurrent use.

Jump to

Keyboard shortcuts

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