Skip to content

Commit

Permalink
feat: storenode cycle
Browse files Browse the repository at this point in the history
  • Loading branch information
richard-ramos committed Sep 19, 2024
1 parent 2800391 commit d9361e5
Show file tree
Hide file tree
Showing 8 changed files with 861 additions and 18 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 d9361e5

Please sign in to comment.