Просмотр исходного кода

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 лет назад
Родитель
Сommit
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...)
 }