Merge pull request #13281 from giuliocalzolari/timestamp

Update debug to have timestamps
pull/13288/head
Matt Farina 1 year ago committed by GitHub
commit 2dc73d8465
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -22,6 +22,7 @@ import (
"log"
"os"
"strings"
"time"
"github.com/spf13/cobra"
"sigs.k8s.io/yaml"
@ -45,7 +46,8 @@ func init() {
func debug(format string, v ...interface{}) {
if settings.Debug {
format = fmt.Sprintf("[debug] %s\n", format)
timeNow := time.Now().String()
format = fmt.Sprintf("%s [debug] %s\n", timeNow, format)
log.Output(2, fmt.Sprintf(format, v...))
}
}

Loading…
Cancel
Save