add generic logerr func to shorten code
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
This commit is contained in:
parent
fe75b71620
commit
665a3cc666
2 changed files with 44 additions and 114 deletions
7
hscontrol/util/log.go
Normal file
7
hscontrol/util/log.go
Normal file
|
@ -0,0 +1,7 @@
|
|||
package util
|
||||
|
||||
import "github.com/rs/zerolog/log"
|
||||
|
||||
func LogErr(err error, msg string) {
|
||||
log.Error().Caller().Err(err).Msg(msg)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue