Explorar o código

Add trace log level to the log package (#2458)

This allows us to produce high-granularity logs at a level below debug,
thus allowing us to reduce logspam for users.

Signed-off-by: Michael Dresser <michaelmdresser@gmail.com>
Michael Dresser %!s(int64=2) %!d(string=hai) anos
pai
achega
883bee681a
Modificáronse 1 ficheiros con 8 adicións e 0 borrados
  1. 8 0
      core/pkg/log/log.go

+ 8 - 0
core/pkg/log/log.go

@@ -126,6 +126,14 @@ func Debugf(format string, a ...interface{}) {
 	log.Debug().Msgf(format, a...)
 }
 
+func Trace(msg string) {
+	log.Trace().Msg(msg)
+}
+
+func Tracef(format string, a ...interface{}) {
+	log.Trace().Msgf(format, a...)
+}
+
 func Fatalf(format string, a ...interface{}) {
 	log.Fatal().Msgf(format, a...)
 }