Skip to content

Commit 1aefcc2

Browse files
authored
Merge pull request #3619 from dragon-flyings/log
🐛 fix: disable log timestamp
2 parents b7e878e + 2addf1d commit 1aefcc2

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

cmd/main.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ import (
3737
grafanav1alpha1 "sigs.k8s.io/kubebuilder/v3/pkg/plugins/optional/grafana/v1alpha"
3838
)
3939

40+
func init() {
41+
// Disable timestamps on the default TextFormatter
42+
logrus.SetFormatter(&logrus.TextFormatter{DisableTimestamp: true})
43+
}
44+
4045
func main() {
4146

4247
const deprecateMessageGoV3Bundle = "This version is deprecated." +

hack/docs/generate_samples.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import (
2727
const KubebuilderBinName = "/tmp/kubebuilder/bin/kubebuilder"
2828

2929
func main() {
30+
log.SetFormatter(&log.TextFormatter{DisableTimestamp: true})
3031
log.Println("Generating documents...")
3132

3233
log.Println("Generating component-config tutorial...")

0 commit comments

Comments
 (0)