Skip to content
This repository was archived by the owner on Apr 16, 2025. It is now read-only.

Commit fb56451

Browse files
committed
change log time format to rfc3339
1 parent c09c54c commit fb56451

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

pkg/utils/git/git_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ func tearDownGitTest() {
110110
}
111111

112112
func TestGetGitCommitHashFromHead_DummyRepo2(t *testing.T) {
113-
setupLog(t)
113+
setupLog()
114114
gitDirPath := setupGitTest("test_data2.zip", "test_data2")
115115

116116
releaseBranchHeadCommitHash := "a1ee44808de2a42d291b59fefb5c66b8ff6bf898"
@@ -122,7 +122,7 @@ func TestGetGitCommitHashFromHead_DummyRepo2(t *testing.T) {
122122
}
123123

124124
func TestGetGitCommitTags(t *testing.T) {
125-
setupLog(t)
125+
setupLog()
126126
gitDirPath := setupGitTest("test_data.zip", "test_data")
127127

128128
branchName := "branch-with-tags"
@@ -143,7 +143,7 @@ func TestGetGitCommitTags(t *testing.T) {
143143
}
144144

145145
func TestGetGitChangedFolders_DummyRepo(t *testing.T) {
146-
setupLog(t)
146+
setupLog()
147147
scenarios := []struct {
148148
name string
149149
beforeCommitExclusive string
@@ -395,6 +395,6 @@ func TestGetGitChangedFolders_DummyRepo(t *testing.T) {
395395
tearDownGitTest()
396396
}
397397

398-
func setupLog(t *testing.T) {
398+
func setupLog() {
399399
logger.InitializeLogger(zerolog.DebugLevel, true)
400400
}

pkg/utils/logger/logger.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ func InitializeLogger(logLevel zerolog.Level, prettyPrint bool) {
1212
zerolog.SetGlobalLevel(logLevel)
1313
zerolog.DurationFieldUnit = time.Millisecond
1414
if prettyPrint {
15-
log.Logger = log.Output(zerolog.ConsoleWriter{Out: os.Stderr, TimeFormat: time.TimeOnly})
15+
log.Logger = log.Output(zerolog.ConsoleWriter{Out: os.Stderr, TimeFormat: time.RFC3339})
1616
}
1717

1818
zerolog.DefaultContextLogger = &log.Logger

0 commit comments

Comments
 (0)