Skip to content

Commit

Permalink
feat: storenode cycle (#1223)
Browse files Browse the repository at this point in the history
  • Loading branch information
richard-ramos authored Oct 14, 2024
1 parent 0ed94ce commit 76275f6
Show file tree
Hide file tree
Showing 15 changed files with 1,300 additions and 69 deletions.
8 changes: 8 additions & 0 deletions logging/logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,14 @@ func (t timestamp) String() string {
return time.Unix(0, int64(t)).Format(time.RFC3339)
}

func Timep(key string, time *int64) zapcore.Field {
if time == nil {
return zap.String(key, "-")
} else {
return Time(key, *time)
}
}

func Epoch(key string, time time.Time) zap.Field {
return zap.String(key, fmt.Sprintf("%d", time.UnixNano()))
}
Expand Down
Loading

0 comments on commit 76275f6

Please sign in to comment.