@@ -47,7 +47,7 @@ func (s *service) Run(ctx context.Context) {
4747 case <- ticker .C :
4848 s .logger .Debug ("Persisting online status" )
4949 if err := s .persist (ctx ); err != nil {
50- s .logger .Error ("Can't persist online status" , zap .Error (err ))
50+ s .logger .Error ("failed to persist online status" , zap .Error (err ))
5151 }
5252 }
5353 }
@@ -62,7 +62,7 @@ func (s *service) SetOnline(ctx context.Context, deviceID string) {
6262 s .metrics .ObserveCacheLatency (func () {
6363 if err = s .cache .Set (ctx , deviceID , []byte (dt )); err != nil {
6464 s .metrics .IncrementCacheOperation (operationSet , statusError )
65- s .logger .Error ("Can't set online status" , zap .String ("device_id" , deviceID ), zap .Error (err ))
65+ s .logger .Error ("failed to set online status" , zap .String ("device_id" , deviceID ), zap .Error (err ))
6666 s .metrics .IncrementStatusSet (false )
6767 }
6868 })
@@ -98,7 +98,7 @@ func (s *service) persist(ctx context.Context) error {
9898 timestamps := maps .MapValues (items , func (v []byte ) time.Time {
9999 t , err := time .Parse (time .RFC3339 , string (v ))
100100 if err != nil {
101- s .logger .Warn ("Can't parse last seen" , zap .String ("last_seen" , string (v )), zap .Error (err ))
101+ s .logger .Warn ("failed to parse last seen" , zap .String ("last_seen" , string (v )), zap .Error (err ))
102102 return time .Now ().UTC ()
103103 }
104104
0 commit comments