Improved receive.go
- Fixed configuration listen-port semantics - Improved receive.go code for updating listen port - Updated under load detection, how follows the kernel space implementation - Fixed trie bug accidentally introduced in last commit - Added interface name to log (format still subject to change) - Can now configure the logging level using the LOG_LEVEL variable - Begin porting netsh.sh tests - A number of smaller changes
This commit is contained in:
parent
cba1d6585a
commit
a4eff12d7f
16 changed files with 616 additions and 218 deletions
16
src/main.go
16
src/main.go
|
|
@ -65,9 +65,23 @@ func main() {
|
|||
return
|
||||
}
|
||||
|
||||
// get log level (default: info)
|
||||
|
||||
logLevel := func() int {
|
||||
switch os.Getenv("LOG_LEVEL") {
|
||||
case "debug":
|
||||
return LogLevelDebug
|
||||
case "info":
|
||||
return LogLevelInfo
|
||||
case "error":
|
||||
return LogLevelError
|
||||
}
|
||||
return LogLevelInfo
|
||||
}()
|
||||
|
||||
// create wireguard device
|
||||
|
||||
device := NewDevice(tun, LogLevelDebug)
|
||||
device := NewDevice(tun, logLevel)
|
||||
|
||||
logInfo := device.log.Info
|
||||
logError := device.log.Error
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue