status-go/logutils/custom.go
richΛrd 0937850268
chore: use custom logger for message timestamps and log query duration (#5199)
* chore_: use custom logger for message timestamps
* chore_: log store query duration
2024-05-21 13:29:29 -04:00

16 lines
235 B
Go

package logutils
import (
"fmt"
"go.uber.org/zap"
)
func WakuMessageTimestamp(key string, value *int64) zap.Field {
valueStr := "-"
if value != nil {
valueStr = fmt.Sprintf("%d", *value)
}
return zap.String(key, valueStr)
}