mirror of
https://github.com/juanfont/headscale.git
synced 2025-08-11 15:27:37 +00:00
embed (hidden) tailsql for debugging (#1663)
Signed-off-by: Kristoffer Dalby <kristoffer@dalby.cc>
This commit is contained in:
@@ -1,7 +1,16 @@
|
||||
package util
|
||||
|
||||
import "github.com/rs/zerolog/log"
|
||||
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...)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user