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