Skip to content

Commit

Permalink
Merge pull request #13281 from giuliocalzolari/timestamp
Browse files Browse the repository at this point in the history
Update debug to have timestamps
  • Loading branch information
mattfarina authored Aug 30, 2024
2 parents 950b3e3 + 31a1252 commit 2dc73d8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/helm/helm.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"log"
"os"
"strings"
"time"

"github.com/spf13/cobra"
"sigs.k8s.io/yaml"
Expand All @@ -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...))
}
}
Expand Down

0 comments on commit 2dc73d8

Please sign in to comment.