Skip to content

Commit 76275f6

Browse files
feat: storenode cycle (#1223)
1 parent 0ed94ce commit 76275f6

15 files changed

+1300
-69
lines changed

logging/logging.go

+8
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,14 @@ func (t timestamp) String() string {
7474
return time.Unix(0, int64(t)).Format(time.RFC3339)
7575
}
7676

77+
func Timep(key string, time *int64) zapcore.Field {
78+
if time == nil {
79+
return zap.String(key, "-")
80+
} else {
81+
return Time(key, *time)
82+
}
83+
}
84+
7785
func Epoch(key string, time time.Time) zap.Field {
7886
return zap.String(key, fmt.Sprintf("%d", time.UnixNano()))
7987
}

0 commit comments

Comments
 (0)