device: combine debug and info log levels into 'verbose'
There are very few cases, if any, in which a user only wants one of these levels, so combine it into a single level. While we're at it, reduce indirection on the loggers by using an empty function rather than a nil function pointer. It's not like we have retpolines anyway, and we were always calling through a function with a branch prior, so this seems like a net gain. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
@@ -148,7 +148,7 @@ NextAttempt:
|
||||
} else {
|
||||
p.ip = net.ParseIP("1.0.0.2")
|
||||
}
|
||||
level := LogLevelDebug
|
||||
level := LogLevelVerbose
|
||||
if _, ok := tb.(*testing.B); ok && !testing.Verbose() {
|
||||
level = LogLevelError
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user