2023-06-22 08:38:57 -06:00
|
|
|
package util
|
|
|
|
|
2023-12-20 13:47:48 -07:00
|
|
|
import (
|
|
|
|
"github.com/rs/zerolog/log"
|
|
|
|
"tailscale.com/types/logger"
|
|
|
|
)
|
2023-06-22 08:38:57 -06:00
|
|
|
|
|
|
|
func LogErr(err error, msg string) {
|
|
|
|
log.Error().Caller().Err(err).Msg(msg)
|
|
|
|
}
|
2023-12-20 13:47:48 -07:00
|
|
|
|
|
|
|
func TSLogfWrapper() logger.Logf {
|
|
|
|
return func(format string, args ...any) {
|
|
|
|
log.Debug().Caller().Msgf(format, args...)
|
|
|
|
}
|
|
|
|
}
|