headscale/hscontrol/util/log.go
Kristoffer Dalby 55ca078f22
embed (hidden) tailsql for debugging (#1663)
Signed-off-by: Kristoffer Dalby <kristoffer@dalby.cc>
2023-12-20 21:47:48 +01:00

17 lines
293 B
Go

package util
import (
"github.com/rs/zerolog/log"
"tailscale.com/types/logger"
)
func LogErr(err error, msg string) {
log.Error().Caller().Err(err).Msg(msg)
}
func TSLogfWrapper() logger.Logf {
return func(format string, args ...any) {
log.Debug().Caller().Msgf(format, args...)
}
}