This is a set of extensions for Wireguard-go
's logger.
To use wglog in your Go project, install it using go get
:
go get github.com/point-c/wglog
noop
: Non-nil logger that does nothing.slog
: Converts aslog.Logger
to adevice.Logger
.- Logging is done on the following levels:
Verbosef
slog.LevelDebug
Errorf
slog.LevelError
- Logging is done on the following levels:
multi
: Emits log messages on multiple loggers.async
: Runs the logger funcs in a goroutine.
The package includes tests that demonstrate its functionality. Use Go's testing tools to run the tests:
go test
To regenerate godocs:
go generate -tags docs ./...