Преглед изворни кода

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 пре 2 година
родитељ
комит
883bee681a
1 измењених фајлова са 8 додато и 0 уклоњено
  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...)
 }