Skip to content
/ wglog Public

wglog enhances the functionality of the device.Logger type found in wireguard-go

License

Notifications You must be signed in to change notification settings

point-c/wglog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 Cannot retrieve latest commit at this time.

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wglog

Go Reference Go Coverage

This is a set of extensions for Wireguard-go's logger.

Installation

To use wglog in your Go project, install it using go get:

go get github.com/point-c/wglog

Loggers

  • noop: Non-nil logger that does nothing.
  • slog: Converts a slog.Logger to a device.Logger.
    • Logging is done on the following levels:
      • Verbosef
        • slog.LevelDebug
      • Errorf
        • slog.LevelError
  • multi: Emits log messages on multiple loggers.
  • async: Runs the logger funcs in a goroutine.

Testing

The package includes tests that demonstrate its functionality. Use Go's testing tools to run the tests:

go test

Godocs

To regenerate godocs:

go generate -tags docs ./...

About

wglog enhances the functionality of the device.Logger type found in wireguard-go

Topics

Resources

License

Stars

Watchers

Forks

Languages