mirror of
https://github.com/juanfont/headscale.git
synced 2024-11-26 08:53:05 +00:00
55ca078f22
Signed-off-by: Kristoffer Dalby <kristoffer@dalby.cc>
16 lines
293 B
Go
16 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...)
|
|
}
|
|
}
|